|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android" |
| 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" |
| 5 | + android:id="@+id/faq_card" |
| 6 | + style="@style/Widget.Material3.CardView.Filled" |
4 | 7 | android:layout_width="match_parent" |
5 | 8 | android:layout_height="wrap_content" |
6 | | - android:orientation="vertical"> |
| 9 | + android:layout_marginHorizontal="0dp" |
| 10 | + android:layout_marginVertical="4dp" |
| 11 | + android:animateLayoutChanges="true" |
| 12 | + android:clickable="true" |
| 13 | + android:focusable="true" |
| 14 | + android:foreground="?attr/selectableItemBackground" |
| 15 | + app:cardBackgroundColor="@android:color/transparent" |
| 16 | + app:cardCornerRadius="12dp" |
| 17 | + app:cardElevation="0dp" |
| 18 | + app:strokeWidth="0dp"> |
7 | 19 |
|
8 | 20 | <androidx.appcompat.widget.LinearLayoutCompat |
9 | | - android:id="@+id/question_container" |
| 21 | + android:id="@+id/faq_item_root" |
10 | 22 | android:layout_width="match_parent" |
11 | 23 | android:layout_height="wrap_content" |
12 | | - android:background="?attr/selectableItemBackground" |
13 | | - android:clickable="true" |
14 | | - android:focusable="true" |
15 | | - android:gravity="center_vertical" |
16 | | - android:orientation="horizontal" |
17 | | - android:paddingVertical="12dp"> |
| 24 | + android:animateLayoutChanges="true" |
| 25 | + android:orientation="vertical"> |
18 | 26 |
|
19 | | - <com.google.android.material.textview.MaterialTextView |
20 | | - android:id="@+id/question" |
21 | | - android:layout_width="0dp" |
| 27 | + <androidx.appcompat.widget.LinearLayoutCompat |
| 28 | + android:id="@+id/question_container" |
| 29 | + android:layout_width="match_parent" |
22 | 30 | android:layout_height="wrap_content" |
23 | | - android:layout_weight="1" |
24 | | - android:paddingEnd="16dp" |
25 | | - android:textAppearance="@style/TextAppearance.Material3.TitleSmall" |
26 | | - android:textStyle="bold" /> |
| 31 | + android:clickable="true" |
| 32 | + android:clipToOutline="true" |
| 33 | + android:focusable="true" |
| 34 | + android:foreground="?attr/selectableItemBackground" |
| 35 | + android:gravity="center_vertical" |
| 36 | + android:orientation="horizontal" |
| 37 | + android:paddingHorizontal="12dp" |
| 38 | + android:paddingVertical="12dp" |
| 39 | + tools:targetApi="31"> |
27 | 40 |
|
28 | | - <androidx.appcompat.widget.AppCompatImageView |
29 | | - android:id="@+id/toggle_icon" |
30 | | - android:layout_width="24dp" |
31 | | - android:layout_height="24dp" |
32 | | - android:contentDescription="@null" |
33 | | - android:importantForAccessibility="no" |
34 | | - android:tint="?attr/colorOnSurfaceVariant" |
35 | | - app:srcCompat="@drawable/ic_expand_more_24" /> |
| 41 | + <com.google.android.material.textview.MaterialTextView |
| 42 | + android:id="@+id/question" |
| 43 | + android:layout_width="0dp" |
| 44 | + android:layout_height="wrap_content" |
| 45 | + android:layout_weight="1" |
| 46 | + android:paddingStart="8dp" |
| 47 | + android:paddingEnd="8dp" |
| 48 | + android:textAppearance="@style/TextAppearance.Material3.TitleSmall" |
| 49 | + android:textStyle="bold" /> |
36 | 50 |
|
37 | | - </androidx.appcompat.widget.LinearLayoutCompat> |
| 51 | + <com.google.android.material.button.MaterialButton |
| 52 | + android:id="@+id/toggle_icon" |
| 53 | + style="@style/Widget.Material3Expressive.Button.IconButton.Outlined" |
| 54 | + android:layout_width="wrap_content" |
| 55 | + android:layout_height="wrap_content" |
| 56 | + android:contentDescription="@null" |
| 57 | + android:importantForAccessibility="no" |
| 58 | + app:icon="@drawable/ic_expand_more_24" |
| 59 | + app:iconTint="?attr/colorOnSurfaceVariant" /> |
| 60 | + </androidx.appcompat.widget.LinearLayoutCompat> |
38 | 61 |
|
39 | | - <com.google.android.material.textview.MaterialTextView |
40 | | - android:id="@+id/answer" |
41 | | - android:layout_width="match_parent" |
42 | | - android:layout_height="wrap_content" |
43 | | - android:layout_marginTop="8dp" |
44 | | - android:textAppearance="@style/TextAppearance.Material3.BodyMedium" |
45 | | - android:visibility="gone" /> |
| 62 | + <com.google.android.material.textview.MaterialTextView |
| 63 | + android:id="@+id/answer" |
| 64 | + android:layout_width="match_parent" |
| 65 | + android:layout_height="wrap_content" |
| 66 | + android:layout_marginTop="8dp" |
| 67 | + android:paddingHorizontal="12dp" |
| 68 | + android:textAppearance="@style/TextAppearance.Material3.BodyMedium" |
| 69 | + android:visibility="gone" /> |
46 | 70 |
|
47 | | - <com.google.android.material.divider.MaterialDivider |
48 | | - android:id="@+id/divider" |
49 | | - android:layout_width="match_parent" |
50 | | - android:layout_height="wrap_content" |
51 | | - android:layout_marginTop="12dp" /> |
| 71 | + <com.google.android.material.divider.MaterialDivider |
| 72 | + android:id="@+id/divider" |
| 73 | + android:layout_width="match_parent" |
| 74 | + android:layout_height="wrap_content" |
| 75 | + android:layout_marginTop="12dp" /> |
52 | 76 |
|
53 | | -</androidx.appcompat.widget.LinearLayoutCompat> |
| 77 | + </androidx.appcompat.widget.LinearLayoutCompat> |
| 78 | +</com.google.android.material.card.MaterialCardView> |
0 commit comments