|
4 | 4 | xmlns:tools="http://schemas.android.com/tools" |
5 | 5 | android:layout_width="match_parent" |
6 | 6 | android:layout_height="@dimen/item_song_height" |
7 | | - android:layout_marginStart="2dp" |
8 | | - android:layout_marginEnd="2dp" |
| 7 | + android:layout_marginVertical="2dp" |
| 8 | + android:layout_marginHorizontal="2dp" |
9 | 9 | android:background="?rectSelector" |
10 | 10 | android:clickable="true" |
11 | 11 | android:focusable="true" |
12 | 12 | android:orientation="horizontal"> |
13 | 13 |
|
14 | | - <FrameLayout |
| 14 | + <com.google.android.material.card.MaterialCardView |
15 | 15 | android:id="@+id/imageContainer" |
16 | 16 | android:layout_width="wrap_content" |
17 | | - android:layout_height="match_parent" |
18 | | - android:layout_weight="0" |
19 | | - android:paddingStart="8dp" |
20 | | - android:paddingEnd="8dp" |
| 17 | + android:layout_height="wrap_content" |
| 18 | + android:layout_marginHorizontal="8dp" |
| 19 | + android:scaleType="centerCrop" |
| 20 | + app:cardCornerRadius="10dp" |
| 21 | + app:layout_constraintDimensionRatio="1:1" |
21 | 22 | app:layout_constraintBottom_toBottomOf="parent" |
22 | 23 | app:layout_constraintStart_toStartOf="parent" |
23 | 24 | app:layout_constraintTop_toTopOf="parent"> |
24 | 25 |
|
25 | | - <com.google.android.material.textview.MaterialTextView |
26 | | - android:id="@+id/imageText" |
27 | | - android:layout_width="40dp" |
28 | | - android:layout_height="match_parent" |
29 | | - android:gravity="center" |
30 | | - android:maxLines="1" |
31 | | - android:minHeight="40dp" |
32 | | - android:textAppearance="@style/TextViewNormal" |
33 | | - android:textColor="?android:attr/textColorSecondary" |
34 | | - tools:text="@tools:sample/us_zipcodes" /> |
35 | | - </FrameLayout> |
| 26 | + <androidx.appcompat.widget.AppCompatImageView |
| 27 | + android:id="@+id/image" |
| 28 | + android:layout_width="45dp" |
| 29 | + android:layout_height="45dp" |
| 30 | + android:layout_gravity="center_vertical" |
| 31 | + android:gravity="center_vertical" |
| 32 | + android:scaleType="centerCrop" |
| 33 | + tools:ignore="ContentDescription" |
| 34 | + tools:srcCompat="@tools:sample/backgrounds/scenic" /> |
| 35 | + |
| 36 | + </com.google.android.material.card.MaterialCardView> |
36 | 37 |
|
37 | 38 | <com.google.android.material.textview.MaterialTextView |
38 | 39 | android:id="@+id/title" |
39 | 40 | android:layout_width="0dp" |
40 | 41 | android:layout_height="wrap_content" |
41 | 42 | android:layout_weight="1" |
| 43 | + android:layout_marginTop="12dp" |
| 44 | + android:layout_marginHorizontal="8dp" |
42 | 45 | android:singleLine="true" |
43 | 46 | android:ellipsize="marquee" |
44 | | - android:paddingTop="8dp" |
45 | 47 | android:textAppearance="@style/TextViewBody2" |
46 | 48 | app:layout_constraintEnd_toStartOf="@+id/menu" |
47 | 49 | app:layout_constraintStart_toEndOf="@+id/imageContainer" |
|
53 | 55 | android:layout_width="wrap_content" |
54 | 56 | android:layout_height="wrap_content" |
55 | 57 | android:layout_weight="0" |
| 58 | + android:layout_marginTop="4dp" |
| 59 | + android:layout_marginHorizontal="8dp" |
56 | 60 | android:maxLines="1" |
57 | 61 | android:textAppearance="@style/TextViewCaption" |
58 | 62 | app:layout_constraintStart_toEndOf="@id/imageContainer" |
|
64 | 68 | android:layout_width="wrap_content" |
65 | 69 | android:layout_height="wrap_content" |
66 | 70 | android:layout_weight="0" |
| 71 | + android:layout_marginTop="4dp" |
| 72 | + android:layout_marginHorizontal="8dp" |
67 | 73 | android:maxLines="1" |
68 | 74 | android:textAppearance="@style/TextViewCaption" |
69 | 75 | app:layout_constraintEnd_toStartOf="@id/menu" |
|
0 commit comments