|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 2 | +<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" |
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 | 6 | android:background="?attr/colorPrimary" |
7 | | - android:fitsSystemWindows="true" |
8 | | - android:orientation="vertical"> |
| 7 | + android:fitsSystemWindows="true"> |
9 | 8 |
|
10 | | - <com.google.android.material.appbar.MaterialToolbar |
11 | | - android:id="@+id/toolbar" |
| 9 | + <com.google.android.material.appbar.AppBarLayout |
12 | 10 | android:layout_width="match_parent" |
13 | | - android:layout_height="?attr/actionBarSize" |
| 11 | + android:layout_height="200dp" |
14 | 12 | android:background="?attr/colorPrimary" |
15 | 13 | android:fitsSystemWindows="true" |
16 | | - app:navigationIcon="@drawable/ic_arrow_back" |
17 | | - app:navigationIconTint="?attr/colorOnPrimary" |
18 | | - app:title="@string/settings_per_app" |
19 | | - app:titleTextColor="?attr/colorOnPrimary" /> |
| 14 | + app:elevation="0dp"> |
20 | 15 |
|
21 | | - <com.google.android.material.card.MaterialCardView |
| 16 | + <com.google.android.material.appbar.CollapsingToolbarLayout |
| 17 | + android:layout_width="match_parent" |
| 18 | + android:layout_height="match_parent" |
| 19 | + app:contentScrim="?attr/colorPrimary" |
| 20 | + app:expandedTitleMarginStart="24dp" |
| 21 | + app:expandedTitleTextColor="?attr/colorOnPrimary" |
| 22 | + app:layout_scrollFlags="scroll|exitUntilCollapsed" |
| 23 | + app:title="@string/settings_per_app" |
| 24 | + app:titleCollapseMode="scale"> |
| 25 | + |
| 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 | + <com.google.android.material.appbar.MaterialToolbar |
| 36 | + android:id="@+id/toolbar" |
| 37 | + android:layout_width="match_parent" |
| 38 | + android:layout_height="?attr/actionBarSize" |
| 39 | + app:layout_collapseMode="pin" |
| 40 | + app:navigationIcon="@drawable/ic_arrow_back" |
| 41 | + app:navigationIconTint="?attr/colorOnPrimary" |
| 42 | + app:titleTextColor="?attr/colorOnPrimary" /> |
| 43 | + </com.google.android.material.appbar.CollapsingToolbarLayout> |
| 44 | + </com.google.android.material.appbar.AppBarLayout> |
| 45 | + |
| 46 | + <FrameLayout |
22 | 47 | android:layout_width="match_parent" |
23 | | - android:layout_height="112dp" |
24 | | - android:layout_marginHorizontal="16dp" |
25 | | - android:layout_marginTop="8dp" |
26 | | - app:cardBackgroundColor="?attr/colorCard" |
27 | | - app:cardCornerRadius="26dp" |
28 | | - app:cardElevation="0dp"> |
| 48 | + android:layout_height="match_parent" |
| 49 | + android:background="@drawable/uwu_background_collapse" |
| 50 | + app:layout_behavior="@string/appbar_scrolling_view_behavior"> |
29 | 51 |
|
30 | | - <ImageView |
31 | | - android:layout_width="wrap_content" |
| 52 | + <LinearLayout |
| 53 | + android:layout_width="match_parent" |
32 | 54 | android:layout_height="match_parent" |
33 | | - android:layout_gravity="end" |
34 | | - android:alpha="0.72" |
35 | | - android:contentDescription="@null" |
36 | | - android:src="@drawable/uwu_banner_image_2" /> |
| 55 | + android:orientation="vertical" |
| 56 | + android:paddingTop="16dp"> |
37 | 57 |
|
38 | | - <TextView |
39 | | - android:layout_width="wrap_content" |
40 | | - android:layout_height="wrap_content" |
41 | | - android:layout_gravity="center_vertical" |
42 | | - android:layout_marginStart="20dp" |
43 | | - android:text="APP PROXY" |
44 | | - android:textColor="?attr/colorOnSurface" |
45 | | - android:textSize="24sp" |
46 | | - android:textStyle="bold" /> |
47 | | - </com.google.android.material.card.MaterialCardView> |
| 58 | + <com.google.android.material.card.MaterialCardView |
| 59 | + 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"> |
48 | 65 |
|
49 | | - <com.google.android.material.button.MaterialButtonToggleGroup |
50 | | - android:id="@+id/mode_group" |
51 | | - android:layout_width="match_parent" |
52 | | - android:layout_height="wrap_content" |
53 | | - android:layout_marginTop="12dp" |
54 | | - android:paddingHorizontal="16dp" |
55 | | - android:paddingBottom="8dp" |
56 | | - app:selectionRequired="true" |
57 | | - app:singleSelection="true"> |
| 66 | + <com.google.android.material.button.MaterialButtonToggleGroup |
| 67 | + android:id="@+id/mode_group" |
| 68 | + android:layout_width="match_parent" |
| 69 | + android:layout_height="wrap_content" |
| 70 | + android:padding="8dp" |
| 71 | + app:selectionRequired="true" |
| 72 | + app:singleSelection="true"> |
58 | 73 |
|
59 | | - <com.google.android.material.button.MaterialButton |
60 | | - android:id="@+id/mode_all" |
61 | | - style="?attr/materialButtonOutlinedStyle" |
62 | | - android:layout_width="0dp" |
63 | | - android:layout_height="wrap_content" |
64 | | - android:layout_weight="1" |
65 | | - android:text="@string/per_app_mode_all" /> |
| 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" /> |
66 | 81 |
|
67 | | - <com.google.android.material.button.MaterialButton |
68 | | - android:id="@+id/mode_allow" |
69 | | - style="?attr/materialButtonOutlinedStyle" |
70 | | - android:layout_width="0dp" |
71 | | - android:layout_height="wrap_content" |
72 | | - android:layout_weight="1" |
73 | | - android:text="@string/per_app_mode_allow" /> |
| 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" /> |
74 | 89 |
|
75 | | - <com.google.android.material.button.MaterialButton |
76 | | - android:id="@+id/mode_disallow" |
77 | | - style="?attr/materialButtonOutlinedStyle" |
78 | | - android:layout_width="0dp" |
79 | | - android:layout_height="wrap_content" |
80 | | - android:layout_weight="1" |
81 | | - android:text="@string/per_app_mode_disallow" /> |
82 | | - </com.google.android.material.button.MaterialButtonToggleGroup> |
| 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> |
83 | 99 |
|
84 | | - <FrameLayout |
85 | | - android:layout_width="match_parent" |
86 | | - android:layout_height="0dp" |
87 | | - android:layout_weight="1" |
88 | | - android:background="@drawable/uwu_background_collapse"> |
| 100 | + <FrameLayout |
| 101 | + android:layout_width="match_parent" |
| 102 | + android:layout_height="0dp" |
| 103 | + android:layout_weight="1" |
| 104 | + android:layout_marginTop="8dp"> |
89 | 105 |
|
90 | | - <androidx.recyclerview.widget.RecyclerView |
91 | | - android:id="@+id/rv_apps" |
92 | | - android:layout_width="match_parent" |
93 | | - android:layout_height="match_parent" |
94 | | - android:clipToPadding="false" |
95 | | - android:paddingBottom="16dp" /> |
| 106 | + <androidx.recyclerview.widget.RecyclerView |
| 107 | + android:id="@+id/rv_apps" |
| 108 | + android:layout_width="match_parent" |
| 109 | + android:layout_height="match_parent" |
| 110 | + android:clipToPadding="false" |
| 111 | + android:paddingBottom="16dp" /> |
96 | 112 |
|
97 | | - <ProgressBar |
98 | | - android:id="@+id/progress" |
99 | | - android:layout_width="wrap_content" |
100 | | - android:layout_height="wrap_content" |
101 | | - android:layout_gravity="center" /> |
| 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> |
102 | 120 | </FrameLayout> |
103 | | -</LinearLayout> |
| 121 | +</androidx.coordinatorlayout.widget.CoordinatorLayout> |
0 commit comments