Skip to content

Commit eff0ca8

Browse files
committed
Little update and Bringback UWU UI
1 parent adcf9c5 commit eff0ca8

File tree

11 files changed

+233
-177
lines changed

11 files changed

+233
-177
lines changed
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<vector xmlns:android="http://schemas.android.com/apk/res/android"
22
android:width="24dp"
33
android:height="24dp"
4-
android:viewportWidth="1024"
5-
android:viewportHeight="1024">
6-
4+
android:viewportHeight="24"
5+
android:viewportWidth="24">
76
<path
8-
android:fillColor="#FF000000"
9-
android:pathData="M742.4,409.6L716.8,409.6L716.8,332.8C716.8,205.8 613.4,102.4 486.4,102.4S256,205.8 256,332.8L256,409.6h-25.6C188.1,409.6 153.6,444.1 153.6,486.4v409.6c0,42.3 34.5,76.8 76.8,76.8h512c42.3,0 76.8,-34.5 76.8,-76.8v-409.6c0,-42.3 -34.5,-76.8 -76.8,-76.8zM307.2,332.8C307.2,234 387.6,153.6 486.4,153.6S665.6,234 665.6,332.8L665.6,409.6L307.2,409.6L307.2,332.8zM768,896a25.6,25.6 0,0 1,-25.6 25.6h-512a25.6,25.6 0,0 1,-25.6 -25.6v-409.6a25.6,25.6 0,0 1,25.6 -25.6h512a25.6,25.6 0,0 1,25.6 25.6v409.6z" />
10-
7+
android:fillColor="#ff000000"
8+
android:pathData="M12,17C10.89,17 10,16.1 10,15C10,13.89 10.89,13 12,13A2,2 0,0 1,14 15A2,2 0,0 1,12 17M18,20V10H6V20H18M18,8A2,2 0,0 1,20 10V20A2,2 0,0 1,18 22H6C4.89,22 4,21.1 4,20V10C4,8.89 4.89,8 6,8H7V6A5,5 0,0 1,12 1A5,5 0,0 1,17 6V8H18M12,3A3,3 0,0 0,9 6V8H15V6A3,3 0,0 0,12 3Z" />
119
</vector>

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

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,23 @@
276276
android:layout_marginStart="16.0dip"
277277
android:layout_marginEnd="16.0dip">
278278
<LinearLayout
279-
android:orientation="vertical"
279+
android:orientation="horizontal"
280280
android:layout_width="match_parent"
281281
android:layout_height="wrap_content"
282282
android:layout_marginTop="16.0dip"
283283
android:layout_marginBottom="8.0dip">
284+
<com.google.android.material.materialswitch.MaterialSwitch
285+
android:id="@+id/chk_locked"
286+
android:text="@string/routing_settings_locked"
287+
android:layout_width="wrap_content"
288+
android:layout_height="wrap_content" />
289+
</LinearLayout>
290+
<LinearLayout
291+
android:orientation="vertical"
292+
android:layout_width="match_parent"
293+
android:layout_height="wrap_content"
294+
android:layout_marginTop="8.0dip"
295+
android:layout_marginBottom="8.0dip">
284296
<com.google.android.material.textfield.TextInputLayout
285297
android:layout_width="match_parent"
286298
android:layout_height="wrap_content"
@@ -295,18 +307,6 @@
295307
android:inputType="text" />
296308
</com.google.android.material.textfield.TextInputLayout>
297309
</LinearLayout>
298-
<LinearLayout
299-
android:orientation="horizontal"
300-
android:layout_width="match_parent"
301-
android:layout_height="wrap_content"
302-
android:layout_marginTop="8.0dip"
303-
android:layout_marginBottom="8.0dip">
304-
<com.google.android.material.materialswitch.MaterialSwitch
305-
android:id="@+id/chk_locked"
306-
android:text="@string/routing_settings_locked"
307-
android:layout_width="wrap_content"
308-
android:layout_height="wrap_content" />
309-
</LinearLayout>
310310
<LinearLayout
311311
android:orientation="vertical"
312312
android:layout_width="match_parent"
@@ -334,9 +334,8 @@
334334
android:layout_marginTop="8.0dip"
335335
android:layout_marginBottom="8.0dip">
336336
<com.google.android.material.textfield.TextInputLayout
337-
android:layout_width="200.0dip"
337+
android:layout_width="match_parent"
338338
android:layout_height="wrap_content"
339-
android:layout_marginRight="10.0dip"
340339
android:hint="@string/routing_settings_ip"
341340
app:expandedHintEnabled="false"
342341
style="@style/Outline_TextInputLayout">
@@ -347,6 +346,13 @@
347346
android:hint="@string/routing_settings_tips"
348347
android:inputType="textMultiLine" />
349348
</com.google.android.material.textfield.TextInputLayout>
349+
</LinearLayout>
350+
<LinearLayout
351+
android:orientation="horizontal"
352+
android:layout_width="match_parent"
353+
android:layout_height="wrap_content"
354+
android:layout_marginTop="8.0dip"
355+
android:layout_marginBottom="8.0dip">
350356
<com.google.android.material.textfield.TextInputLayout
351357
android:layout_width="match_parent"
352358
android:layout_height="wrap_content"

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

Lines changed: 138 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,164 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:app="http://schemas.android.com/apk/res-auto"
2+
<LinearLayout
43
android:gravity="center_vertical"
54
android:id="@+id/item_bg"
65
android:layout_width="match_parent"
76
android:layout_height="wrap_content"
87
android:layout_marginLeft="16.0dip"
9-
android:layout_marginTop="4.0dip"
8+
android:layout_marginTop="8.0dip"
109
android:layout_marginRight="16.0dip"
11-
android:layout_marginBottom="4.0dip">
10+
android:layout_marginBottom="8.0dip"
11+
xmlns:android="http://schemas.android.com/apk/res/android"
12+
xmlns:app="http://schemas.android.com/apk/res-auto">
1213
<androidx.cardview.widget.CardView
13-
android:orientation="horizontal"
1414
android:id="@+id/item_cardview"
1515
android:layout_width="match_parent"
1616
android:layout_height="wrap_content"
17-
android:layout_margin="@dimen/cardview_margin"
1817
app:cardBackgroundColor="@color/uwu_bg_card"
1918
app:cardCornerRadius="24.0dip"
2019
app:cardElevation="0.0dip">
2120
<LinearLayout
22-
android:gravity="center"
23-
android:layout_gravity="center"
2421
android:orientation="horizontal"
2522
android:id="@+id/info_container"
26-
android:background="?attr/selectableItemBackground"
2723
android:focusable="true"
28-
android:nextFocusRight="@+id/layout_edit"
2924
android:clickable="true"
3025
android:layout_width="match_parent"
31-
android:layout_height="wrap_content">
26+
android:layout_height="wrap_content"
27+
android:foreground="?android:selectableItemBackground">
3228
<LinearLayout
33-
android:orientation="vertical"
34-
android:layout_width="0.0dip"
35-
android:layout_height="wrap_content"
36-
android:layout_weight="1.0"
37-
android:paddingStart="@dimen/padding_start">
29+
android:orientation="horizontal"
30+
android:id="@+id/layout_indicator"
31+
android:background="@color/uwu_transparent"
32+
android:layout_width="match_parent"
33+
android:layout_height="match_parent">
3834
<LinearLayout
39-
android:layout_width="wrap_content"
40-
android:layout_height="wrap_content"
41-
android:layout_marginTop="10.0dip"
42-
android:orientation="horizontal">
43-
<TextView
44-
android:id="@+id/remarks"
45-
android:layout_width="wrap_content"
46-
android:layout_height="wrap_content"
47-
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
48-
<ImageView
49-
android:id="@+id/img_locked"
50-
android:layout_gravity="center"
51-
android:layout_marginStart="@dimen/padding_start"
52-
android:layout_width="16dp"
53-
android:layout_height="16dp"
54-
app:srcCompat="@drawable/ic_lock_24dp" />
55-
</LinearLayout>
56-
<TextView
57-
android:textAppearance="@style/TextAppearance.AppCompat.Small"
58-
android:id="@+id/domainIp"
59-
android:layout_width="wrap_content"
60-
android:layout_height="wrap_content"
61-
android:layout_marginTop="10.0dip"
62-
android:lines="1" />
63-
<TextView
64-
android:textAppearance="@style/TextAppearance.AppCompat.Small"
65-
android:id="@+id/outboundTag"
66-
android:layout_width="wrap_content"
67-
android:layout_height="wrap_content"
68-
android:layout_marginTop="10.0dip"
69-
android:layout_marginBottom="10.0dip"
70-
android:lines="1" />
71-
</LinearLayout>
72-
<LinearLayout
73-
android:gravity="center"
74-
android:orientation="vertical"
75-
android:layout_width="wrap_content"
76-
android:layout_height="@dimen/sub_height"
77-
android:paddingStart="@dimen/padding_start"
78-
android:paddingEnd="@dimen/padding_end">
79-
<LinearLayout
80-
android:gravity="center"
8135
android:orientation="vertical"
82-
android:id="@+id/layout_edit"
83-
android:background="?attr/selectableItemBackgroundBorderless"
84-
android:padding="@dimen/layout_margin_spacing"
85-
android:focusable="true"
86-
android:nextFocusLeft="@+id/info_container"
87-
android:clickable="true"
88-
android:layout_width="wrap_content"
89-
android:layout_height="wrap_content">
90-
<ImageView
91-
android:layout_width="@dimen/png_height"
92-
android:layout_height="@dimen/png_height"
93-
app:srcCompat="@drawable/ic_edit_24dp"
94-
app:tint="?android:textColorPrimary" />
95-
</LinearLayout>
96-
<LinearLayout
97-
android:orientation="horizontal"
98-
android:layout_width="wrap_content"
99-
android:layout_height="wrap_content"
100-
android:layout_marginTop="@dimen/padding_start">
101-
<com.neko.switchbutton.SwitchButton
102-
android:gravity="center"
103-
android:layout_gravity="center"
104-
android:id="@+id/chk_enable"
105-
android:layout_width="wrap_content"
106-
android:layout_height="wrap_content"
107-
app:kswAnimationDuration="300"
108-
app:kswBackDrawable="@drawable/uwu_switch_track"
109-
app:kswThumbDrawable="@drawable/uwu_switch_thumb" />
36+
android:nextFocusRight="@+id/layout_edit"
37+
android:layout_width="match_parent"
38+
android:layout_height="match_parent">
39+
<LinearLayout
40+
android:orientation="horizontal"
41+
android:id="@+id/container"
42+
android:layout_width="match_parent"
43+
android:layout_height="wrap_content">
44+
<LinearLayout
45+
android:gravity="center_vertical"
46+
android:layout_gravity="center_vertical"
47+
android:paddingLeft="12.0dip"
48+
android:paddingTop="8.0dip"
49+
android:paddingRight="0.0dip"
50+
android:paddingBottom="4.0dip"
51+
android:layout_width="0.0dip"
52+
android:layout_height="wrap_content"
53+
android:layout_weight="1.0">
54+
<TextView
55+
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
56+
android:textSize="17.0sp"
57+
android:textColor="?android:textColorPrimary"
58+
android:id="@+id/remarks"
59+
android:layout_width="wrap_content"
60+
android:layout_height="wrap_content"
61+
android:maxLines="2"
62+
android:minLines="1" />
63+
<ImageView
64+
android:id="@+id/img_locked"
65+
android:paddingLeft="12.0dip"
66+
android:layout_width="28.0dip"
67+
android:layout_height="28.0dip"
68+
android:src="@drawable/ic_lock_24dp"
69+
app:tint="?android:textColorSecondary" />
70+
</LinearLayout>
71+
<LinearLayout
72+
android:gravity="center"
73+
android:orientation="vertical"
74+
android:id="@+id/layout_edit"
75+
android:background="?attr/selectableItemBackgroundBorderless"
76+
android:paddingLeft="0.0dip"
77+
android:paddingTop="8.0dip"
78+
android:paddingRight="12.0dip"
79+
android:paddingBottom="4.0dip"
80+
android:focusable="true"
81+
android:clickable="true"
82+
android:layout_width="wrap_content"
83+
android:layout_height="wrap_content">
84+
<ImageView
85+
android:layout_width="@dimen/png_height"
86+
android:layout_height="@dimen/png_height"
87+
android:src="@drawable/ic_edit_24dp"
88+
app:tint="?android:textColorPrimary" />
89+
</LinearLayout>
90+
</LinearLayout>
91+
<LinearLayout
92+
android:orientation="horizontal"
93+
android:id="@+id/contener"
94+
android:layout_width="match_parent"
95+
android:layout_height="wrap_content">
96+
<LinearLayout
97+
android:gravity="center_vertical"
98+
android:layout_gravity="center_vertical"
99+
android:paddingLeft="12.0dip"
100+
android:paddingTop="4.0dip"
101+
android:paddingRight="0.0dip"
102+
android:paddingBottom="4.0dip"
103+
android:layout_width="0.0dip"
104+
android:layout_height="wrap_content"
105+
android:layout_weight="1.0">
106+
<TextView
107+
android:textAppearance="@style/TextAppearance.AppCompat.Small"
108+
android:textSize="14.0sp"
109+
android:textColor="?android:textColorSecondary"
110+
android:id="@+id/domainIp"
111+
android:layout_width="wrap_content"
112+
android:layout_height="wrap_content"
113+
android:maxLines="1"
114+
android:minLines="1" />
115+
</LinearLayout>
116+
</LinearLayout>
117+
<LinearLayout
118+
android:orientation="horizontal"
119+
android:id="@+id/contleler"
120+
android:layout_width="match_parent"
121+
android:layout_height="wrap_content">
122+
<LinearLayout
123+
android:gravity="center_vertical"
124+
android:layout_gravity="center_vertical"
125+
android:paddingLeft="12.0dip"
126+
android:paddingTop="4.0dip"
127+
android:paddingRight="0.0dip"
128+
android:paddingBottom="8.0dip"
129+
android:layout_width="0.0dip"
130+
android:layout_height="wrap_content"
131+
android:layout_weight="1.0">
132+
<TextView
133+
android:textAppearance="@style/TextAppearance.AppCompat.Small"
134+
android:textSize="14.0sp"
135+
android:textColor="?attr/colorThemeUwu"
136+
android:id="@+id/outboundTag"
137+
android:layout_width="wrap_content"
138+
android:layout_height="wrap_content"
139+
android:maxLines="1"
140+
android:minLines="1" />
141+
</LinearLayout>
142+
<LinearLayout
143+
android:gravity="center"
144+
android:orientation="vertical"
145+
android:paddingLeft="0.0dip"
146+
android:paddingTop="4.0dip"
147+
android:paddingRight="12.0dip"
148+
android:paddingBottom="8.0dip"
149+
android:layout_width="wrap_content"
150+
android:layout_height="wrap_content">
151+
<com.neko.switchbutton.SwitchButton
152+
android:gravity="center"
153+
android:layout_gravity="center"
154+
android:id="@+id/chk_enable"
155+
android:layout_width="wrap_content"
156+
android:layout_height="wrap_content"
157+
app:kswAnimationDuration="300"
158+
app:kswBackDrawable="@drawable/uwu_switch_track"
159+
app:kswThumbDrawable="@drawable/uwu_switch_thumb" />
160+
</LinearLayout>
161+
</LinearLayout>
110162
</LinearLayout>
111163
</LinearLayout>
112164
</LinearLayout>

0 commit comments

Comments
 (0)