|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | 2 | <com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android" |
3 | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
| 4 | + xmlns:tools="http://schemas.android.com/tools" |
4 | 5 | android:layout_width="match_parent" |
5 | 6 | android:layout_height="wrap_content" |
6 | 7 | app:cardCornerRadius="4dp" |
7 | 8 | app:cardElevation="3dp" |
8 | 9 | app:cardPreventCornerOverlap="true" |
9 | | - app:cardUseCompatPadding="true"> |
| 10 | + app:cardUseCompatPadding="true" |
| 11 | + tools:layout_width="200dp"> |
10 | 12 |
|
11 | 13 | <androidx.constraintlayout.widget.ConstraintLayout |
12 | 14 | android:layout_width="match_parent" |
|
17 | 19 | android:layout_width="match_parent" |
18 | 20 | android:layout_height="0dp" |
19 | 21 | app:layout_constraintBottom_toBottomOf="parent" |
20 | | - app:layout_constraintDimensionRatio="1:1" |
| 22 | + app:layout_constraintDimensionRatio="1" |
| 23 | + app:layout_constraintEnd_toEndOf="parent" |
| 24 | + app:layout_constraintHorizontal_bias="0.5" |
| 25 | + app:layout_constraintStart_toStartOf="parent" |
| 26 | + app:layout_constraintTop_toTopOf="parent" |
| 27 | + tools:srcCompat="@tools:sample/backgrounds/scenic" /> |
| 28 | + |
| 29 | + <androidx.appcompat.widget.AppCompatTextView |
| 30 | + android:id="@+id/textView" |
| 31 | + android:layout_width="0dp" |
| 32 | + android:layout_height="wrap_content" |
| 33 | + android:background="#9A000000" |
| 34 | + android:gravity="center" |
| 35 | + android:maxLines="1" |
| 36 | + android:padding="12dp" |
| 37 | + android:textColor="@android:color/white" |
| 38 | + app:layout_constraintBottom_toBottomOf="parent" |
21 | 39 | app:layout_constraintEnd_toEndOf="parent" |
22 | 40 | app:layout_constraintHorizontal_bias="0.5" |
23 | 41 | app:layout_constraintStart_toStartOf="parent" |
|
0 commit comments