Skip to content

Commit 2347112

Browse files
committed
refine original Miku UI layouts
1 parent c88aa06 commit 2347112

10 files changed

Lines changed: 321 additions & 64 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
3+
<solid android:color="?attr/colorOutline" />
4+
<corners android:radius="4dp" />
5+
</shape>

app/src/main/res/layout/activity_about.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
android:background="?attr/colorSurfaceVariant">
6+
android:background="?attr/colorPrimary">
77

88
<com.google.android.material.appbar.AppBarLayout
99
android:id="@+id/appbar"
@@ -65,6 +65,7 @@
6565
<androidx.core.widget.NestedScrollView
6666
android:layout_width="match_parent"
6767
android:layout_height="match_parent"
68+
android:background="@drawable/uwu_background_collapse"
6869
android:clipToPadding="false"
6970
android:paddingBottom="16dp"
7071
app:layout_behavior="@string/appbar_scrolling_view_behavior">
@@ -81,7 +82,7 @@
8182
android:layout_height="wrap_content"
8283
android:layout_marginHorizontal="16dp"
8384
android:layout_marginBottom="8dp"
84-
app:cardBackgroundColor="?attr/colorSurfaceContainerLow"
85+
app:cardBackgroundColor="?attr/colorCard"
8586
app:cardCornerRadius="28dp"
8687
app:cardElevation="0dp"
8788
app:strokeWidth="0dp">
@@ -138,7 +139,7 @@
138139
android:layout_height="wrap_content"
139140
android:layout_marginHorizontal="16dp"
140141
android:layout_marginBottom="12dp"
141-
app:cardBackgroundColor="?attr/colorSecondaryContainer"
142+
app:cardBackgroundColor="?attr/colorCard"
142143
app:cardCornerRadius="28dp"
143144
app:cardElevation="0dp"
144145
app:strokeWidth="0dp">
@@ -172,7 +173,7 @@
172173
android:layout_marginTop="12dp"
173174
android:gravity="center"
174175
android:text="@string/uwu_about_miku_title"
175-
android:textColor="?attr/colorOnSecondaryContainer"
176+
android:textColor="?attr/colorOnSurface"
176177
android:textSize="17sp"
177178
android:textStyle="bold" />
178179

@@ -182,7 +183,7 @@
182183
android:layout_marginTop="8dp"
183184
android:lineSpacingMultiplier="1.15"
184185
android:text="@string/uwu_about_miku_summary"
185-
android:textColor="?attr/colorOnSecondaryContainer"
186+
android:textColor="?attr/colorOnSurfaceVariant"
186187
android:textSize="13sp" />
187188
</LinearLayout>
188189
</com.google.android.material.card.MaterialCardView>
@@ -208,7 +209,7 @@
208209
android:layout_width="match_parent"
209210
android:layout_height="wrap_content"
210211
android:layout_marginHorizontal="16dp"
211-
app:cardBackgroundColor="?attr/colorSurfaceContainerLow"
212+
app:cardBackgroundColor="?attr/colorCard"
212213
app:cardCornerRadius="28dp"
213214
app:cardElevation="0dp"
214215
app:strokeWidth="0dp">

app/src/main/res/layout/activity_app_list.xml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
android:background="?attr/colorSurface"
6+
android:background="?attr/colorPrimary"
77
android:fitsSystemWindows="true"
88
android:orientation="vertical">
99

@@ -12,15 +12,45 @@
1212
android:layout_width="match_parent"
1313
android:layout_height="?attr/actionBarSize"
1414
android:background="?attr/colorPrimary"
15+
android:fitsSystemWindows="true"
1516
app:navigationIcon="@drawable/ic_arrow_back"
1617
app:navigationIconTint="?attr/colorOnPrimary"
1718
app:title="@string/settings_per_app"
1819
app:titleTextColor="?attr/colorOnPrimary" />
1920

21+
<com.google.android.material.card.MaterialCardView
22+
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">
29+
30+
<ImageView
31+
android:layout_width="wrap_content"
32+
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" />
37+
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>
48+
2049
<com.google.android.material.button.MaterialButtonToggleGroup
2150
android:id="@+id/mode_group"
2251
android:layout_width="match_parent"
2352
android:layout_height="wrap_content"
53+
android:layout_marginTop="12dp"
2454
android:paddingHorizontal="16dp"
2555
android:paddingBottom="8dp"
2656
app:selectionRequired="true"
@@ -54,7 +84,8 @@
5484
<FrameLayout
5585
android:layout_width="match_parent"
5686
android:layout_height="0dp"
57-
android:layout_weight="1">
87+
android:layout_weight="1"
88+
android:background="@drawable/uwu_background_collapse">
5889

5990
<androidx.recyclerview.widget.RecyclerView
6091
android:id="@+id/rv_apps"

app/src/main/res/layout/activity_logcat.xml

Lines changed: 58 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,67 @@
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
android:layout_width="match_parent"
55
android:layout_height="match_parent"
6-
android:background="?attr/colorSurface"
6+
android:background="?attr/colorPrimary"
77
android:fitsSystemWindows="true">
88

99
<com.google.android.material.appbar.AppBarLayout
1010
android:layout_width="match_parent"
11-
android:layout_height="wrap_content"
11+
android:layout_height="200dp"
12+
android:fitsSystemWindows="true"
13+
android:background="?attr/colorPrimary"
1214
app:elevation="0dp">
1315

14-
<com.google.android.material.appbar.MaterialToolbar
15-
android:id="@+id/toolbar"
16+
<com.google.android.material.appbar.CollapsingToolbarLayout
1617
android:layout_width="match_parent"
17-
android:layout_height="?attr/actionBarSize"
18-
android:background="?attr/colorPrimary"
19-
app:navigationIcon="@drawable/ic_arrow_back"
20-
app:navigationIconTint="?attr/colorOnPrimary"
21-
app:title="@string/menu_log"
22-
app:titleTextColor="?attr/colorOnPrimary" />
18+
android:layout_height="match_parent"
19+
app:contentScrim="?attr/colorPrimary"
20+
app:layout_scrollFlags="scroll|exitUntilCollapsed">
21+
22+
<ImageView
23+
android:layout_width="match_parent"
24+
android:layout_height="match_parent"
25+
android:alpha="0.42"
26+
android:contentDescription="@null"
27+
android:scaleType="centerCrop"
28+
android:src="@drawable/uwu_banner_image_2"
29+
app:layout_collapseMode="parallax" />
30+
31+
<View
32+
android:layout_width="match_parent"
33+
android:layout_height="match_parent"
34+
android:background="#40000000" />
35+
36+
<com.google.android.material.appbar.MaterialToolbar
37+
android:id="@+id/toolbar"
38+
android:layout_width="match_parent"
39+
android:layout_height="?attr/actionBarSize"
40+
app:layout_collapseMode="pin"
41+
app:navigationIcon="@drawable/ic_arrow_back"
42+
app:navigationIconTint="?attr/colorOnPrimary"
43+
app:title="@string/menu_log"
44+
app:titleTextColor="?attr/colorOnPrimary" />
45+
46+
<TextView
47+
android:layout_width="wrap_content"
48+
android:layout_height="wrap_content"
49+
android:layout_gravity="bottom|start"
50+
android:layout_marginStart="28dp"
51+
android:layout_marginBottom="28dp"
52+
android:text="LOGCAT"
53+
android:textColor="?attr/colorOnPrimary"
54+
android:textSize="31sp"
55+
android:textStyle="bold" />
56+
</com.google.android.material.appbar.CollapsingToolbarLayout>
2357
</com.google.android.material.appbar.AppBarLayout>
2458

2559
<androidx.core.widget.NestedScrollView
2660
android:id="@+id/logcat_scroll"
2761
android:layout_width="match_parent"
2862
android:layout_height="match_parent"
29-
android:padding="12dp"
63+
android:layout_marginTop="-24dp"
64+
android:background="@drawable/uwu_background_collapse"
65+
android:clipToPadding="false"
66+
android:padding="18dp"
3067
app:layout_behavior="@string/appbar_scrolling_view_behavior">
3168

3269
<HorizontalScrollView
@@ -39,10 +76,10 @@
3976
android:layout_width="wrap_content"
4077
android:layout_height="wrap_content"
4178
android:fontFamily="monospace"
42-
android:paddingBottom="88dp"
79+
android:paddingBottom="92dp"
4380
android:textColor="?attr/colorOnSurfaceVariant"
44-
android:textSize="11sp"
45-
android:textIsSelectable="true" />
81+
android:textIsSelectable="true"
82+
android:textSize="11sp" />
4683
</HorizontalScrollView>
4784
</androidx.core.widget.NestedScrollView>
4885

@@ -51,8 +88,13 @@
5188
android:layout_width="wrap_content"
5289
android:layout_height="wrap_content"
5390
android:layout_gravity="bottom|end"
54-
android:layout_margin="16dp"
91+
android:layout_margin="20dp"
5592
android:text="@string/action_clear"
56-
app:icon="@drawable/ic_action_delete" />
93+
app:backgroundTint="?attr/colorCard"
94+
app:icon="@drawable/ic_action_delete"
95+
app:iconTint="?attr/colorOnSurface"
96+
app:strokeColor="?attr/colorOutline"
97+
app:strokeWidth="1dp"
98+
android:textColor="?attr/colorOnSurface" />
5799

58100
</androidx.coordinatorlayout.widget.CoordinatorLayout>

app/src/main/res/layout/activity_main.xml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
android:layout_width="0dp"
127127
android:layout_height="wrap_content"
128128
android:layout_weight="1"
129-
android:orientation="vertical">
129+
android:orientation="horizontal">
130130

131131
<com.google.android.material.card.MaterialCardView
132132
android:layout_width="52dp"
@@ -147,19 +147,22 @@
147147
<TextView
148148
android:layout_width="wrap_content"
149149
android:layout_height="wrap_content"
150-
android:layout_marginTop="8dp"
150+
android:layout_gravity="center_vertical"
151+
android:layout_marginStart="12dp"
151152
android:fontFamily="@font/uwu_font_title"
152153
android:text="Hi, miku 💕"
153-
android:textColor="@android:color/white"
154-
android:textSize="18sp"
154+
android:textColor="?attr/colorOnSurface"
155+
android:textSize="17sp"
155156
android:textStyle="bold" />
156157

157158
<TextView
158159
android:layout_width="wrap_content"
159160
android:layout_height="wrap_content"
160161
android:fontFamily="@font/uwu_font_summary"
161162
android:text="Good night..."
162-
android:textColor="@android:color/white"
163+
android:layout_gravity="center_vertical"
164+
android:layout_marginStart="8dp"
165+
android:textColor="?attr/colorOnSurfaceVariant"
163166
android:textSize="14sp" />
164167
</LinearLayout>
165168

app/src/main/res/layout/activity_settings.xml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,28 @@
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
7-
android:background="?attr/colorSurface"
7+
android:background="?attr/colorPrimary"
88
android:fitsSystemWindows="true">
99

1010
<com.google.android.material.appbar.AppBarLayout
1111
android:layout_width="match_parent"
12-
android:layout_height="wrap_content"
12+
android:layout_height="200dp"
13+
android:background="?attr/colorPrimary"
14+
android:fitsSystemWindows="true"
1315
app:elevation="0dp">
1416

17+
<ImageView
18+
android:layout_width="match_parent"
19+
android:layout_height="match_parent"
20+
android:alpha="0.35"
21+
android:contentDescription="@null"
22+
android:scaleType="centerCrop"
23+
android:src="@drawable/uwu_banner_image_2" />
24+
1525
<com.google.android.material.appbar.MaterialToolbar
1626
android:id="@+id/toolbar"
1727
android:layout_width="match_parent"
1828
android:layout_height="?attr/actionBarSize"
19-
android:background="?attr/colorPrimary"
2029
app:navigationIcon="@drawable/ic_arrow_back"
2130
app:navigationIconTint="?attr/colorOnPrimary"
2231
app:title="@string/settings"
@@ -26,6 +35,8 @@
2635
<androidx.core.widget.NestedScrollView
2736
android:layout_width="match_parent"
2837
android:layout_height="match_parent"
38+
android:layout_marginTop="-24dp"
39+
android:background="@drawable/uwu_background_collapse"
2940
android:clipToPadding="false"
3041
android:paddingBottom="16dp"
3142
app:layout_behavior="@string/appbar_scrolling_view_behavior">
@@ -36,6 +47,8 @@
3647
android:orientation="vertical"
3748
android:paddingHorizontal="16dp">
3849

50+
<include layout="@layout/uwu_banner_settings_port" />
51+
3952
<TextView
4053
style="@style/SettingsSectionHeader"
4154
android:text="@string/settings_section_appearance" />

0 commit comments

Comments
 (0)