|
15 | 15 | limitations under the License. |
16 | 16 | --> |
17 | 17 |
|
18 | | -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
19 | | - xmlns:app="http://schemas.android.com/apk/res-auto" |
20 | | - xmlns:tools="http://schemas.android.com/tools" |
21 | | - android:id="@+id/cat_demo_landing_row_root" |
22 | | - android:layout_width="match_parent" |
23 | | - android:layout_height="wrap_content" |
24 | | - android:minHeight="@dimen/cat_list_two_line_row_height" |
25 | | - android:paddingLeft="@dimen/cat_list_horizontal_padding" |
26 | | - android:paddingRight="@dimen/cat_list_horizontal_padding" |
27 | | - android:background="?attr/selectableItemBackground" |
28 | | - android:clickable="true" |
29 | | - android:focusable="true" |
30 | | - android:gravity="center_vertical"> |
| 18 | +<androidx.constraintlayout.widget.ConstraintLayout |
| 19 | + xmlns:android="http://schemas.android.com/apk/res/android" |
| 20 | + xmlns:app="http://schemas.android.com/apk/res-auto" |
| 21 | + xmlns:tools="http://schemas.android.com/tools" |
| 22 | + android:id="@+id/cat_demo_landing_row_root" |
| 23 | + android:layout_width="match_parent" |
| 24 | + android:layout_height="wrap_content" |
| 25 | + android:background="?attr/selectableItemBackground" |
| 26 | + android:clickable="true" |
| 27 | + android:focusable="true" |
| 28 | + android:paddingHorizontal="@dimen/cat_list_horizontal_padding" |
| 29 | + android:paddingVertical="@dimen/cat_list_vertical_padding"> |
31 | 30 |
|
32 | 31 | <ImageView |
33 | | - android:id="@+id/cat_demo_landing_row_icon" |
34 | | - android:layout_width="@dimen/cat_list_icon_size" |
35 | | - android:layout_height="@dimen/cat_list_icon_size" |
36 | | - app:srcCompat="@drawable/ic_demo_play_circle_outline_vd_theme_24px"/> |
| 32 | + android:id="@+id/cat_demo_landing_row_icon" |
| 33 | + android:layout_width="@dimen/cat_list_icon_size" |
| 34 | + android:layout_height="@dimen/cat_list_icon_size" |
| 35 | + app:layout_constraintBottom_toBottomOf="parent" |
| 36 | + app:layout_constraintStart_toStartOf="parent" |
| 37 | + app:layout_constraintTop_toTopOf="parent" |
| 38 | + app:srcCompat="@drawable/ic_demo_play_circle_outline_vd_theme_24px" /> |
37 | 39 |
|
38 | 40 | <TextView |
39 | | - android:id="@+id/cat_demo_landing_row_title" |
40 | | - android:layout_width="wrap_content" |
41 | | - android:layout_height="wrap_content" |
42 | | - android:layout_marginStart="@dimen/cat_list_text_margin_from_icon" |
43 | | - android:layout_marginLeft="@dimen/cat_list_text_margin_from_icon" |
44 | | - android:layout_toEndOf="@+id/cat_demo_landing_row_icon" |
45 | | - android:layout_toRightOf="@+id/cat_demo_landing_row_icon" |
46 | | - android:textAppearance="?attr/textAppearanceBody2" |
47 | | - android:ellipsize="end" |
48 | | - android:maxLines="1" |
49 | | - tools:text="Demo"/> |
| 41 | + android:id="@+id/cat_demo_landing_row_title" |
| 42 | + android:layout_width="0dp" |
| 43 | + android:layout_height="wrap_content" |
| 44 | + android:ellipsize="end" |
| 45 | + android:maxLines="1" |
| 46 | + android:textAlignment="viewStart" |
| 47 | + android:textAppearance="?attr/textAppearanceBody2" |
| 48 | + tools:text="Demo" /> |
50 | 49 |
|
51 | 50 | <TextView |
52 | | - android:id="@+id/cat_demo_landing_row_subtitle" |
53 | | - android:layout_width="wrap_content" |
54 | | - android:layout_height="wrap_content" |
55 | | - android:layout_marginStart="@dimen/cat_list_text_margin_from_icon" |
56 | | - android:layout_marginLeft="@dimen/cat_list_text_margin_from_icon" |
57 | | - android:layout_below="@+id/cat_demo_landing_row_title" |
58 | | - android:layout_toEndOf="@+id/cat_demo_landing_row_icon" |
59 | | - android:layout_toRightOf="@+id/cat_demo_landing_row_icon" |
60 | | - android:layout_toStartOf="@+id/cat_demo_landing_row_favorite" |
61 | | - android:layout_toLeftOf="@+id/cat_demo_landing_row_favorite" |
62 | | - android:ellipsize="end" |
63 | | - android:maxLines="1" |
64 | | - android:textAppearance="?attr/textAppearanceCaption" |
65 | | - tools:text="MainDemoFragment"/> |
| 51 | + android:id="@+id/cat_demo_landing_row_subtitle" |
| 52 | + android:layout_width="0dp" |
| 53 | + android:layout_height="wrap_content" |
| 54 | + android:ellipsize="end" |
| 55 | + android:maxLines="1" |
| 56 | + android:textAlignment="viewStart" |
| 57 | + android:textAppearance="?attr/textAppearanceCaption" |
| 58 | + tools:text="MainDemoFragment" /> |
66 | 59 |
|
67 | 60 | <Button |
68 | | - style="?attr/materialIconButtonStyle" |
69 | | - android:id="@+id/cat_demo_landing_row_favorite" |
70 | | - android:layout_width="wrap_content" |
71 | | - android:layout_height="wrap_content" |
72 | | - android:layout_alignParentEnd="true" |
73 | | - android:layout_alignParentRight="true" |
74 | | - android:checkable="true" |
75 | | - android:contentDescription="@string/cat_demo_landing_favorite" |
76 | | - android:saveEnabled="false" |
77 | | - app:icon="@drawable/ic_favorite_vd_theme_24px"/> |
| 61 | + android:id="@+id/cat_demo_landing_row_favorite" |
| 62 | + style="?attr/materialIconButtonStyle" |
| 63 | + android:layout_width="wrap_content" |
| 64 | + android:layout_height="wrap_content" |
| 65 | + android:checkable="true" |
| 66 | + android:contentDescription="@string/cat_demo_landing_favorite" |
| 67 | + android:saveEnabled="false" |
| 68 | + app:icon="@drawable/ic_favorite_vd_theme_24px" |
| 69 | + app:layout_constraintBottom_toBottomOf="parent" |
| 70 | + app:layout_constraintEnd_toEndOf="parent" |
| 71 | + app:layout_constraintTop_toTopOf="parent" /> |
| 72 | + |
| 73 | + <androidx.constraintlayout.helper.widget.Flow |
| 74 | + android:id="@+id/cat_demo_landing_row_titles" |
| 75 | + android:layout_width="0dp" |
| 76 | + android:layout_height="wrap_content" |
| 77 | + android:layout_marginStart="@dimen/cat_list_text_margin_from_icon" |
| 78 | + android:layout_marginLeft="@dimen/cat_list_text_margin_from_icon" |
| 79 | + android:layout_marginEnd="@dimen/cat_list_text_margin_from_button" |
| 80 | + android:layout_marginRight="@dimen/cat_list_text_margin_from_button" |
| 81 | + android:orientation="vertical" |
| 82 | + app:constraint_referenced_ids="cat_demo_landing_row_title,cat_demo_landing_row_subtitle" |
| 83 | + app:layout_constraintBottom_toBottomOf="parent" |
| 84 | + app:layout_constraintEnd_toStartOf="@+id/cat_demo_landing_row_favorite" |
| 85 | + app:layout_constraintStart_toEndOf="@+id/cat_demo_landing_row_icon" |
| 86 | + app:layout_constraintTop_toTopOf="parent" /> |
78 | 87 |
|
79 | | -</RelativeLayout> |
| 88 | +</androidx.constraintlayout.widget.ConstraintLayout> |
0 commit comments