|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<RelativeLayout 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:app="http://schemas.android.com/apk/res-auto" |
4 | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | 5 | android:id="@+id/itemRoot" |
6 | 6 | android:layout_width="match_parent" |
7 | | - android:layout_height="48dp" |
| 7 | + android:layout_height="wrap_content" |
8 | 8 | android:background="?attr/selector" |
9 | 9 | android:clickable="true" |
10 | 10 | android:focusable="true" |
11 | | - android:foreground="?attr/selectableItemBackground" |
12 | | - android:paddingTop="6dp" |
13 | | - android:paddingBottom="6dp"> |
14 | | - |
15 | | - <androidx.appcompat.widget.AppCompatImageView |
16 | | - android:id="@+id/itemSelected" |
17 | | - android:layout_width="10dp" |
18 | | - android:layout_height="10dp" |
19 | | - android:layout_alignParentStart="true" |
20 | | - android:layout_alignParentLeft="true" |
21 | | - android:layout_centerInParent="true" |
22 | | - android:layout_marginLeft="2dp" |
23 | | - android:layout_marginRight="2dp" |
24 | | - android:scaleType="fitXY" |
25 | | - app:srcCompat="?attr/ic_selected" |
26 | | - tools:ignore="ContentDescription,RtlHardcoded" /> |
| 11 | + android:foreground="?attr/selectableItemBackground"> |
27 | 12 |
|
28 | 13 | <ImageView |
29 | 14 | android:id="@+id/itemThumbnailView" |
30 | 15 | android:layout_width="@dimen/play_queue_thumbnail_width" |
31 | 16 | android:layout_height="@dimen/play_queue_thumbnail_height" |
32 | | - android:layout_alignParentTop="true" |
33 | | - android:layout_marginRight="@dimen/video_item_search_image_right_margin" |
34 | | - android:layout_toEndOf="@+id/itemSelected" |
35 | | - android:layout_toRightOf="@+id/itemSelected" |
| 17 | + android:layout_marginStart="@dimen/video_item_search_image_right_margin" |
| 18 | + android:layout_marginTop="@dimen/video_item_search_image_right_margin" |
| 19 | + android:layout_marginBottom="@dimen/video_item_search_image_right_margin" |
36 | 20 | android:contentDescription="@string/list_thumbnail_view_description" |
37 | 21 | android:scaleType="centerCrop" |
38 | 22 | android:src="@drawable/dummy_thumbnail" |
39 | | - tools:ignore="RtlHardcoded" /> |
40 | | - |
41 | | - <androidx.appcompat.widget.AppCompatImageView |
42 | | - android:id="@+id/itemHandle" |
43 | | - android:layout_width="wrap_content" |
44 | | - android:layout_height="match_parent" |
45 | | - android:layout_alignParentRight="true" |
46 | | - android:layout_gravity="center_vertical" |
47 | | - android:padding="@dimen/video_item_search_image_right_margin" |
48 | | - android:scaleType="center" |
49 | | - app:srcCompat="@drawable/ic_drag_handle" |
50 | | - tools:ignore="ContentDescription,RtlHardcoded" /> |
| 23 | + app:layout_constraintBottom_toBottomOf="parent" |
| 24 | + app:layout_constraintStart_toStartOf="parent" |
| 25 | + app:layout_constraintTop_toTopOf="parent" /> |
51 | 26 |
|
52 | 27 | <TextView |
53 | 28 | android:id="@+id/itemDurationView" |
54 | 29 | android:layout_width="wrap_content" |
55 | 30 | android:layout_height="wrap_content" |
56 | | - android:layout_alignRight="@id/itemThumbnailView" |
| 31 | + android:layout_alignEnd="@id/itemThumbnailView" |
57 | 32 | android:layout_alignBottom="@id/itemThumbnailView" |
58 | | - android:layout_marginRight="@dimen/video_item_search_duration_margin" |
| 33 | + android:layout_marginEnd="@dimen/video_item_search_duration_margin" |
59 | 34 | android:layout_marginBottom="@dimen/video_item_search_duration_margin" |
60 | 35 | android:background="@color/duration_background_color" |
61 | | - android:paddingLeft="@dimen/video_item_search_duration_horizontal_padding" |
| 36 | + android:paddingStart="@dimen/video_item_search_duration_horizontal_padding" |
62 | 37 | android:paddingTop="@dimen/video_item_search_duration_vertical_padding" |
63 | | - android:paddingRight="@dimen/video_item_search_duration_horizontal_padding" |
| 38 | + android:paddingEnd="@dimen/video_item_search_duration_horizontal_padding" |
64 | 39 | android:paddingBottom="@dimen/video_item_search_duration_vertical_padding" |
65 | 40 | android:textAppearance="?android:attr/textAppearanceSmall" |
66 | 41 | android:textColor="@color/duration_text_color" |
67 | 42 | android:textSize="@dimen/video_item_search_duration_text_size" |
68 | | - tools:ignore="RtlHardcoded" |
| 43 | + app:layout_constraintBottom_toBottomOf="@+id/itemThumbnailView" |
| 44 | + app:layout_constraintEnd_toEndOf="@+id/itemThumbnailView" |
69 | 45 | tools:text="1:09:10" /> |
70 | 46 |
|
71 | 47 |
|
72 | 48 | <TextView |
73 | 49 | android:id="@+id/itemVideoTitleView" |
74 | | - android:layout_width="match_parent" |
| 50 | + android:layout_width="0dp" |
75 | 51 | android:layout_height="wrap_content" |
76 | 52 | android:layout_alignParentTop="true" |
| 53 | + android:layout_marginStart="8dp" |
77 | 54 | android:layout_toStartOf="@id/itemHandle" |
78 | | - android:layout_toLeftOf="@id/itemHandle" |
79 | 55 | android:layout_toEndOf="@id/itemThumbnailView" |
80 | | - android:layout_toRightOf="@id/itemThumbnailView" |
81 | 56 | android:ellipsize="end" |
82 | 57 | android:singleLine="true" |
83 | 58 | android:textAppearance="?android:attr/textAppearanceLarge" |
84 | 59 | android:textSize="@dimen/video_item_search_title_text_size" |
85 | | - tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. " /> |
| 60 | + app:layout_constraintBottom_toTopOf="@+id/itemAdditionalDetails" |
| 61 | + app:layout_constraintEnd_toStartOf="@+id/itemHandle" |
| 62 | + app:layout_constraintStart_toEndOf="@+id/itemThumbnailView" |
| 63 | + app:layout_constraintTop_toTopOf="parent" |
| 64 | + app:layout_constraintVertical_chainStyle="packed" |
| 65 | + tools:text="Lorem ipsum dolor sit amet, consectetur adipisci elit. " /> |
86 | 66 |
|
87 | 67 | <TextView |
88 | 68 | android:id="@+id/itemAdditionalDetails" |
89 | | - android:layout_width="match_parent" |
| 69 | + android:layout_width="0dp" |
90 | 70 | android:layout_height="wrap_content" |
91 | 71 | android:layout_alignParentBottom="true" |
| 72 | + android:layout_marginStart="8dp" |
92 | 73 | android:layout_toStartOf="@id/itemHandle" |
93 | | - android:layout_toLeftOf="@id/itemHandle" |
94 | 74 | android:layout_toEndOf="@id/itemThumbnailView" |
95 | | - android:layout_toRightOf="@id/itemThumbnailView" |
96 | 75 | android:ellipsize="end" |
97 | 76 | android:singleLine="true" |
98 | 77 | android:textAppearance="?android:attr/textAppearanceSmall" |
99 | 78 | android:textSize="@dimen/video_item_search_upload_date_text_size" |
100 | | - tools:text="Uploader" /> |
| 79 | + app:layout_constraintBottom_toBottomOf="parent" |
| 80 | + app:layout_constraintEnd_toStartOf="@+id/itemHandle" |
| 81 | + app:layout_constraintStart_toEndOf="@+id/itemThumbnailView" |
| 82 | + app:layout_constraintTop_toBottomOf="@+id/itemVideoTitleView" |
| 83 | + tools:text="Uploader uploader uploader uploader uploader · Youtube" /> |
| 84 | + |
| 85 | + <androidx.appcompat.widget.AppCompatImageView |
| 86 | + android:id="@+id/itemHandle" |
| 87 | + android:layout_width="wrap_content" |
| 88 | + android:layout_height="0dp" |
| 89 | + android:layout_alignParentRight="true" |
| 90 | + android:layout_gravity="center_vertical" |
| 91 | + android:paddingHorizontal="@dimen/video_item_search_image_right_margin" |
| 92 | + android:scaleType="center" |
| 93 | + app:layout_constraintBottom_toBottomOf="parent" |
| 94 | + app:layout_constraintEnd_toEndOf="parent" |
| 95 | + app:layout_constraintTop_toTopOf="parent" |
| 96 | + app:srcCompat="@drawable/ic_drag_handle" |
| 97 | + tools:ignore="ContentDescription,RtlHardcoded" /> |
101 | 98 |
|
102 | | -</RelativeLayout> |
| 99 | +</androidx.constraintlayout.widget.ConstraintLayout> |
0 commit comments