|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" |
| 2 | +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | 3 | xmlns:tools="http://schemas.android.com/tools" |
4 | 4 | xmlns:app="http://schemas.android.com/apk/res-auto" |
5 | 5 | android:layout_width="match_parent" |
6 | 6 | android:layout_height="wrap_content" |
| 7 | + android:minHeight="?attr/listPreferredItemHeight" |
7 | 8 | android:foreground="?android:attr/selectableItemBackground" |
8 | | - style="?cardViewStyle" |
9 | | - android:layout_margin="8dp" > |
10 | | - <LinearLayout |
11 | | - android:layout_width="match_parent" |
12 | | - android:layout_height="wrap_content" |
13 | | - android:orientation="vertical"> |
14 | | - <LinearLayout |
15 | | - android:layout_width="match_parent" |
16 | | - android:layout_height="wrap_content" |
17 | | - android:orientation="vertical" |
18 | | - android:padding="16dp"> |
19 | | - |
20 | | - <TextView |
21 | | - android:id="@+id/note_name" |
22 | | - tools:text="Basic (and reversed card)" |
23 | | - android:layout_width="wrap_content" |
24 | | - android:layout_height="wrap_content" |
25 | | - android:textAppearance="?attr/textAppearanceHeadline6" /> |
26 | | - <TextView |
27 | | - android:id="@+id/note_use_count" |
28 | | - android:layout_width="wrap_content" |
29 | | - android:layout_height="wrap_content" |
30 | | - android:layout_marginTop="8dp" |
31 | | - android:textAppearance="?attr/textAppearanceBody2" |
32 | | - android:textColor="?android:attr/textColorSecondary" |
33 | | - tools:text="912 notes"/> |
34 | | - </LinearLayout> |
| 9 | + android:padding="16dp"> |
35 | 10 |
|
36 | | - <androidx.appcompat.widget.ButtonBarLayout |
37 | | - android:layout_width="match_parent" |
38 | | - android:layout_height="wrap_content" > |
39 | | - <Button |
40 | | - android:id="@+id/note_edit_cards" |
41 | | - android:layout_width="wrap_content" |
42 | | - android:layout_height="wrap_content" |
43 | | - style="@style/Widget.Material3.Button.TextButton" |
44 | | - android:textColor="?attr/colorAccent" |
45 | | - android:text="@string/model_browser_template" |
46 | | - app:layout_constraintTop_toTopOf="parent" |
47 | | - app:layout_constraintBottom_toBottomOf="parent" |
48 | | - app:layout_constraintStart_toStartOf="parent" |
49 | | - app:layout_constraintEnd_toStartOf="@id/note_rename" |
50 | | - app:layout_constraintHorizontal_chainStyle="packed" |
51 | | - app:layout_constraintHorizontal_bias="0.0" /> |
| 11 | + <com.ichi2.ui.FixedTextView |
| 12 | + android:id="@+id/note_name" |
| 13 | + android:layout_width="0dp" |
| 14 | + android:layout_height="wrap_content" |
| 15 | + android:textAppearance="?attr/textAppearanceListItem" |
| 16 | + app:layout_constraintTop_toTopOf="parent" |
| 17 | + app:layout_constraintStart_toStartOf="parent" |
| 18 | + app:layout_constraintEnd_toStartOf="@id/note_edit_cards" |
| 19 | + app:layout_constraintHorizontal_bias="0.0" |
| 20 | + tools:text="Basic (and reversed card)" |
| 21 | + /> |
52 | 22 |
|
53 | | - <com.google.android.material.button.MaterialButton |
54 | | - android:id="@+id/note_rename" |
55 | | - android:layout_width="wrap_content" |
56 | | - android:layout_height="wrap_content" |
57 | | - style="@style/Widget.Material3.Button.TextButton" |
58 | | - android:textColor="?attr/colorAccent" |
59 | | - android:text="@string/model_browser_rename" |
60 | | - app:layout_constraintTop_toTopOf="parent" |
61 | | - app:layout_constraintBottom_toBottomOf="parent" |
62 | | - app:layout_constraintStart_toEndOf="@id/note_edit_cards" |
63 | | - app:layout_constraintEnd_toStartOf="@id/spacer" /> |
| 23 | + <com.ichi2.ui.FixedTextView |
| 24 | + android:id="@+id/note_use_count" |
| 25 | + android:layout_width="0dp" |
| 26 | + android:layout_height="wrap_content" |
| 27 | + android:layout_marginTop="8dp" |
| 28 | + android:textAppearance="?attr/textAppearanceListItemSmall" |
| 29 | + android:textColor="?android:attr/textColorSecondary" |
| 30 | + app:layout_constraintTop_toBottomOf="@id/note_name" |
| 31 | + app:layout_constraintStart_toStartOf="parent" |
| 32 | + app:layout_constraintEnd_toStartOf="@id/note_edit_cards" |
| 33 | + app:layout_constraintHorizontal_bias="0.0" |
| 34 | + app:flow_horizontalBias="0.0" |
| 35 | + tools:text="912 notes" |
| 36 | + /> |
64 | 37 |
|
65 | | - <android.widget.Space |
66 | | - android:id="@+id/spacer" |
67 | | - android:layout_width="0dp" |
68 | | - android:layout_height="0dp" |
69 | | - android:layout_weight="1" |
70 | | - app:layout_constraintStart_toEndOf="@id/note_rename" |
71 | | - app:layout_constraintEnd_toStartOf="@id/note_delete" |
72 | | - /> |
| 38 | + <com.google.android.material.button.MaterialButton |
| 39 | + android:id="@+id/note_edit_cards" |
| 40 | + android:layout_width="wrap_content" |
| 41 | + android:layout_height="wrap_content" |
| 42 | + app:icon="@drawable/ic_edit_note" |
| 43 | + style="@style/Widget.Material3.Button.IconButton" |
| 44 | + android:contentDescription="@string/model_browser_template" |
| 45 | + app:layout_constraintTop_toTopOf="parent" |
| 46 | + app:layout_constraintBottom_toBottomOf="parent" |
| 47 | + app:layout_constraintEnd_toStartOf="@+id/btn_more" |
| 48 | + /> |
73 | 49 |
|
74 | | - <com.google.android.material.button.MaterialButton |
75 | | - android:id="@+id/note_delete" |
76 | | - android:layout_width="wrap_content" |
77 | | - android:layout_height="wrap_content" |
78 | | - style="@style/Widget.Material3.Button.TextButton" |
79 | | - android:textColor="?attr/colorAccent" |
80 | | - android:text="@string/dialog_positive_delete" |
81 | | - app:layout_constraintTop_toTopOf="parent" |
82 | | - app:layout_constraintBottom_toBottomOf="parent" |
83 | | - app:layout_constraintEnd_toEndOf="parent" /> |
84 | | - </androidx.appcompat.widget.ButtonBarLayout> |
85 | | - </LinearLayout> |
86 | | -</androidx.cardview.widget.CardView> |
| 50 | + <com.google.android.material.button.MaterialButton |
| 51 | + android:id="@+id/btn_more" |
| 52 | + android:layout_width="wrap_content" |
| 53 | + android:layout_height="wrap_content" |
| 54 | + app:icon="@drawable/ic_more_vertical" |
| 55 | + style="@style/Widget.Material3.Button.IconButton" |
| 56 | + app:layout_constraintTop_toTopOf="parent" |
| 57 | + app:layout_constraintBottom_toBottomOf="parent" |
| 58 | + app:layout_constraintEnd_toEndOf="parent" |
| 59 | + /> |
| 60 | +</androidx.constraintlayout.widget.ConstraintLayout> |
0 commit comments