|
3 | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" |
4 | 4 | android:layout_width="match_parent" |
5 | 5 | android:layout_height="match_parent" |
6 | | - android:background="?attr/colorPrimary" |
7 | 6 | android:fitsSystemWindows="true"> |
8 | 7 |
|
9 | 8 | <com.google.android.material.appbar.AppBarLayout |
| 9 | + android:id="@+id/appbar" |
10 | 10 | android:layout_width="match_parent" |
11 | 11 | android:layout_height="200dp" |
12 | 12 | android:background="?attr/colorPrimary" |
|
16 | 16 | <com.google.android.material.appbar.CollapsingToolbarLayout |
17 | 17 | android:layout_width="match_parent" |
18 | 18 | android:layout_height="match_parent" |
| 19 | + app:collapsedTitleTextColor="?attr/colorOnPrimary" |
19 | 20 | app:contentScrim="?attr/colorPrimary" |
| 21 | + app:expandedTitleMarginEnd="24dp" |
20 | 22 | app:expandedTitleMarginStart="24dp" |
21 | 23 | app:expandedTitleTextColor="?attr/colorOnPrimary" |
22 | 24 | app:layout_scrollFlags="scroll|exitUntilCollapsed" |
23 | 25 | app:title="@string/settings_per_app" |
24 | 26 | app:titleCollapseMode="scale"> |
25 | 27 |
|
26 | | - <ImageView |
27 | | - android:layout_width="wrap_content" |
28 | | - android:layout_height="match_parent" |
29 | | - android:layout_gravity="end" |
30 | | - android:alpha="0.65" |
31 | | - android:contentDescription="@null" |
32 | | - android:src="@drawable/uwu_banner_image_2" |
33 | | - app:layout_collapseMode="parallax" /> |
34 | | - |
35 | 28 | <com.google.android.material.appbar.MaterialToolbar |
36 | 29 | android:id="@+id/toolbar" |
37 | 30 | android:layout_width="match_parent" |
|
49 | 42 | android:background="@drawable/uwu_background_collapse" |
50 | 43 | app:layout_behavior="@string/appbar_scrolling_view_behavior"> |
51 | 44 |
|
52 | | - <LinearLayout |
| 45 | + <com.google.android.material.card.MaterialCardView |
53 | 46 | android:layout_width="match_parent" |
54 | 47 | android:layout_height="match_parent" |
55 | | - android:orientation="vertical" |
56 | | - android:paddingTop="16dp"> |
| 48 | + android:layout_margin="16dp" |
| 49 | + android:paddingTop="16dp" |
| 50 | + app:cardBackgroundColor="@android:color/transparent" |
| 51 | + app:cardCornerRadius="14dp" |
| 52 | + app:cardElevation="0dp"> |
57 | 53 |
|
58 | | - <com.google.android.material.card.MaterialCardView |
| 54 | + <LinearLayout |
59 | 55 | android:layout_width="match_parent" |
60 | | - android:layout_height="wrap_content" |
61 | | - android:layout_marginHorizontal="16dp" |
62 | | - app:cardBackgroundColor="?attr/colorCard" |
63 | | - app:cardCornerRadius="14dp" |
64 | | - app:cardElevation="0dp"> |
| 56 | + android:layout_height="match_parent" |
| 57 | + android:orientation="vertical"> |
65 | 58 |
|
66 | | - <com.google.android.material.button.MaterialButtonToggleGroup |
67 | | - android:id="@+id/mode_group" |
| 59 | + <com.google.android.material.card.MaterialCardView |
68 | 60 | android:layout_width="match_parent" |
69 | 61 | android:layout_height="wrap_content" |
70 | | - android:padding="8dp" |
71 | | - app:selectionRequired="true" |
72 | | - app:singleSelection="true"> |
| 62 | + android:layout_marginBottom="4dp" |
| 63 | + app:cardBackgroundColor="?attr/colorCard" |
| 64 | + app:cardCornerRadius="14dp" |
| 65 | + app:cardElevation="0dp"> |
73 | 66 |
|
74 | | - <com.google.android.material.button.MaterialButton |
75 | | - android:id="@+id/mode_all" |
76 | | - style="?attr/materialButtonOutlinedStyle" |
77 | | - android:layout_width="0dp" |
78 | | - android:layout_height="48dp" |
79 | | - android:layout_weight="1" |
80 | | - android:text="@string/per_app_mode_all" /> |
| 67 | + <com.google.android.material.chip.ChipGroup |
| 68 | + android:id="@+id/mode_group" |
| 69 | + android:layout_width="match_parent" |
| 70 | + android:layout_height="wrap_content" |
| 71 | + android:padding="8dp" |
| 72 | + app:selectionRequired="true" |
| 73 | + app:singleLine="true" |
| 74 | + app:singleSelection="true"> |
81 | 75 |
|
82 | | - <com.google.android.material.button.MaterialButton |
83 | | - android:id="@+id/mode_allow" |
84 | | - style="?attr/materialButtonOutlinedStyle" |
85 | | - android:layout_width="0dp" |
86 | | - android:layout_height="48dp" |
87 | | - android:layout_weight="1" |
88 | | - android:text="@string/per_app_mode_allow" /> |
| 76 | + <com.google.android.material.chip.Chip |
| 77 | + android:id="@+id/mode_all" |
| 78 | + android:layout_width="wrap_content" |
| 79 | + android:layout_height="wrap_content" |
| 80 | + android:text="@string/per_app_mode_all" /> |
89 | 81 |
|
90 | | - <com.google.android.material.button.MaterialButton |
91 | | - android:id="@+id/mode_disallow" |
92 | | - style="?attr/materialButtonOutlinedStyle" |
93 | | - android:layout_width="0dp" |
94 | | - android:layout_height="48dp" |
95 | | - android:layout_weight="1" |
96 | | - android:text="@string/per_app_mode_disallow" /> |
97 | | - </com.google.android.material.button.MaterialButtonToggleGroup> |
98 | | - </com.google.android.material.card.MaterialCardView> |
| 82 | + <com.google.android.material.chip.Chip |
| 83 | + android:id="@+id/mode_allow" |
| 84 | + android:layout_width="wrap_content" |
| 85 | + android:layout_height="wrap_content" |
| 86 | + android:text="@string/per_app_mode_allow" /> |
99 | 87 |
|
100 | | - <FrameLayout |
101 | | - android:layout_width="match_parent" |
102 | | - android:layout_height="0dp" |
103 | | - android:layout_weight="1" |
104 | | - android:layout_marginTop="8dp"> |
| 88 | + <com.google.android.material.chip.Chip |
| 89 | + android:id="@+id/mode_disallow" |
| 90 | + android:layout_width="wrap_content" |
| 91 | + android:layout_height="wrap_content" |
| 92 | + android:text="@string/per_app_mode_disallow" /> |
| 93 | + </com.google.android.material.chip.ChipGroup> |
| 94 | + </com.google.android.material.card.MaterialCardView> |
105 | 95 |
|
106 | | - <androidx.recyclerview.widget.RecyclerView |
107 | | - android:id="@+id/rv_apps" |
| 96 | + <FrameLayout |
108 | 97 | android:layout_width="match_parent" |
109 | | - android:layout_height="match_parent" |
110 | | - android:clipToPadding="false" |
111 | | - android:paddingBottom="16dp" /> |
| 98 | + android:layout_height="0dp" |
| 99 | + android:layout_weight="1"> |
112 | 100 |
|
113 | | - <ProgressBar |
114 | | - android:id="@+id/progress" |
115 | | - android:layout_width="wrap_content" |
116 | | - android:layout_height="wrap_content" |
117 | | - android:layout_gravity="center" /> |
118 | | - </FrameLayout> |
119 | | - </LinearLayout> |
| 101 | + <androidx.recyclerview.widget.RecyclerView |
| 102 | + android:id="@+id/rv_apps" |
| 103 | + android:layout_width="match_parent" |
| 104 | + android:layout_height="match_parent" |
| 105 | + android:clipToPadding="false" |
| 106 | + android:paddingBottom="64dp" /> |
| 107 | + |
| 108 | + <ProgressBar |
| 109 | + android:id="@+id/progress" |
| 110 | + android:layout_width="wrap_content" |
| 111 | + android:layout_height="wrap_content" |
| 112 | + android:layout_gravity="center" /> |
| 113 | + </FrameLayout> |
| 114 | + </LinearLayout> |
| 115 | + </com.google.android.material.card.MaterialCardView> |
120 | 116 | </FrameLayout> |
121 | 117 | </androidx.coordinatorlayout.widget.CoordinatorLayout> |
0 commit comments