Skip to content

Commit 36ccd1a

Browse files
committed
Revamp LockScreen customize section [1/3]
1 parent 34d9b7d commit 36ccd1a

35 files changed

Lines changed: 5357 additions & 548 deletions

res/drawable/ic_cloud.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24">
6+
7+
<path
8+
android:fillColor="#FFFFFFFF"
9+
android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4
10+
C8.69,4 5.91,6.03 5.18,8.99
11+
C2.72,9.36 1,11.36 1,13.9
12+
C1,16.64 3.24,18.9 6,18.9H19
13+
C21.21,18.9 23,17.11 23,14.9
14+
C23,12.79 21.44,11.08 19.35,10.04z"/>
15+
</vector>
Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,67 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout
3-
xmlns:android="http://schemas.android.com/apk/res/android"
4-
android:gravity="center"
5-
android:layout_gravity="center_horizontal"
6-
android:orientation="vertical"
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
74
android:layout_width="match_parent"
8-
android:layout_height="wrap_content">
5+
android:layout_height="wrap_content"
6+
android:layout_gravity="center_horizontal|top"
7+
android:gravity="center_horizontal|top"
8+
android:orientation="vertical">
99
<LinearLayout
10-
android:layout_gravity="center_horizontal"
11-
android:orientation="vertical"
1210
android:layout_width="match_parent"
1311
android:layout_height="wrap_content"
14-
android:layout_marginTop="40dp"
15-
android:layout_marginHorizontal="20dp">
16-
<TextClock
17-
android:textSize="20dp"
18-
android:textColor="@android:color/white"
19-
android:gravity="center"
12+
android:layout_gravity="center_horizontal"
13+
android:orientation="vertical">
14+
<LinearLayout
2015
android:layout_width="match_parent"
2116
android:layout_height="wrap_content"
22-
android:singleLine="true"
23-
android:textAlignment="center"
24-
android:format12Hour="EEE, MMM d"
25-
android:format24Hour="EEE, d MMM"/>
17+
android:gravity="center">
18+
<TextClock
19+
android:id="@+id/date"
20+
android:layout_width="wrap_content"
21+
android:layout_height="wrap_content"
22+
android:format12Hour="EEE, MMM d"
23+
android:format24Hour="EEE, d MMM"
24+
android:gravity="center"
25+
android:singleLine="true"
26+
android:tag="text1|nolineheight"
27+
android:textAlignment="center"
28+
android:textColor="@android:color/white"
29+
android:fontFamily="@*android:string/config_clockFontFamily"
30+
android:textSize="20dp" />
31+
<com.rising.settings.fragments.lockscreen.DummyWeatherImageView
32+
android:id="@+id/weather_image"
33+
android:layout_width="wrap_content"
34+
android:layout_height="wrap_content"
35+
android:fontFamily="@*android:string/config_clockFontFamily"
36+
android:layout_marginStart="8dp"
37+
android:layout_marginEnd="4dp"
38+
android:visibility="gone" />
39+
<com.rising.settings.fragments.lockscreen.DummyWeatherTextView
40+
android:id="@+id/weather_text"
41+
android:layout_width="wrap_content"
42+
android:layout_height="wrap_content"
43+
android:layout_marginStart="4dp"
44+
android:layout_marginEnd="8dp"
45+
android:fontFamily="@*android:string/config_clockFontFamily"
46+
android:textColor="@android:color/white"
47+
android:textSize="20dp"
48+
android:visibility="gone" />
49+
</LinearLayout>
2650
<TextClock
27-
android:textSize="100dp"
28-
android:textStyle="bold"
29-
android:textColor="@android:color/white"
30-
android:gravity="center"
51+
android:id="@+id/clock"
3152
android:layout_width="match_parent"
3253
android:layout_height="wrap_content"
54+
android:alpha="0.9"
55+
android:layout_marginTop="8dp"
56+
android:fontFamily="@*android:string/config_clockFontFamily"
57+
android:format12Hour="hh:mm"
58+
android:format24Hour="HH:mm"
59+
android:gravity="center"
3360
android:singleLine="true"
61+
android:tag="text1"
3462
android:textAlignment="center"
35-
android:format12Hour="hh:mm"
36-
android:format24Hour="HH:mm"/>
63+
android:textColor="@android:color/white"
64+
android:textSize="100dp"
65+
android:textStyle="bold" />
3766
</LinearLayout>
3867
</LinearLayout>

res/layout/keyguard_clock_ide.xml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
34
xmlns:android="http://schemas.android.com/apk/res/android"
45
android:layout_width="match_parent"
56
android:layout_height="wrap_content"
@@ -297,6 +298,45 @@
297298
android:textStyle="bold" />
298299
</LinearLayout>
299300

301+
<LinearLayout
302+
android:layout_width="match_parent"
303+
android:layout_height="wrap_content"
304+
android:layout_gravity="start"
305+
android:gravity="start"
306+
android:orientation="horizontal">
307+
308+
<TextView
309+
android:layout_width="wrap_content"
310+
android:layout_height="wrap_content"
311+
android:fontFamily="@*android:string/config_clockFontFamily"
312+
android:text="\tweather = \u0022"
313+
android:textColor="@android:color/white"
314+
android:textSize="16sp"
315+
android:textStyle="bold" />
316+
317+
<com.rising.settings.fragments.lockscreen.DummyWeatherTextView
318+
android:id="@+id/clockWeather"
319+
android:layout_width="wrap_content"
320+
android:layout_height="wrap_content"
321+
android:fontFamily="@*android:string/config_clockFontFamily"
322+
android:gravity="center"
323+
android:letterSpacing="0.3"
324+
android:textColor="#ff0000"
325+
android:singleLine="true"
326+
android:textAllCaps="true"
327+
android:textSize="16sp" />
328+
329+
<TextView
330+
android:layout_width="wrap_content"
331+
android:layout_height="wrap_content"
332+
android:fontFamily="@*android:string/config_clockFontFamily"
333+
android:paddingStart="-0.5dip"
334+
android:text="\u0022;"
335+
android:textColor="@android:color/white"
336+
android:textSize="16sp"
337+
android:textStyle="bold" />
338+
</LinearLayout>
339+
300340
<LinearLayout
301341
android:layout_width="fill_parent"
302342
android:layout_height="wrap_content"

res/layout/keyguard_clock_miui.xml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,65 @@
99
<LinearLayout
1010
android:orientation="vertical"
1111
android:layout_width="fill_parent"
12-
android:layout_height="wrap_content"
13-
android:layout_marginTop="40.0dip"
14-
android:layout_marginStart="25dp">
12+
android:layout_height="wrap_content">
1513
<TextClock
16-
android:textSize="70.0dip"
14+
android:textSize="100.0dip"
1715
android:textColor="@android:color/white"
1816
android:layout_width="fill_parent"
1917
android:layout_height="wrap_content"
2018
android:singleLine="true"
21-
android:fontFamily="@font/slim"
19+
android:fontFamily="@*android:string/config_clockFontFamily"
2220
android:format12Hour="hh:mm"
2321
android:format24Hour="HH:mm"/>
2422
<TextClock
2523
android:textSize="60.0dip"
2624
android:textColor="@android:color/white"
2725
android:layout_width="fill_parent"
2826
android:layout_height="wrap_content"
27+
android:layout_marginTop="-15.0dip"
2928
android:singleLine="true"
3029
android:textAlignment="viewStart"
31-
android:fontFamily="@font/slim"
30+
android:fontFamily="@*android:string/config_clockFontFamily"
3231
android:textAllCaps="true"
33-
android:format12Hour="EEE"
34-
android:format24Hour="EEE"/>
32+
android:format12Hour="EEE"
33+
android:format24Hour="EEE"/>
3534
<TextClock
36-
android:textSize="50.0dip"
35+
android:id="@+id/miui_date"
36+
android:textSize="60.0dip"
3737
android:textColor="@android:color/white"
3838
android:layout_width="fill_parent"
3939
android:layout_height="wrap_content"
40+
android:layout_marginTop="-10.0dip"
4041
android:singleLine="true"
4142
android:textAlignment="viewStart"
42-
android:fontFamily="@font/slim"
43-
android:format12Hour="MM/dd "
44-
android:format24Hour="MM/dd "/>
43+
android:fontFamily="@*android:string/config_clockFontFamily"
44+
android:format12Hour="MM/dd"
45+
android:format24Hour="MM/dd"/>
46+
<LinearLayout
47+
android:orientation="horizontal"
48+
android:layout_width="wrap_content"
49+
android:layout_height="wrap_content"
50+
android:gravity="start|center">
51+
<com.rising.settings.fragments.lockscreen.DummyWeatherImageView
52+
android:id="@+id/miui_weather_image"
53+
android:layout_width="wrap_content"
54+
android:layout_height="wrap_content"
55+
android:fontFamily="@*android:string/config_clockFontFamily"
56+
android:layout_marginStart="8dp"
57+
android:layout_marginEnd="4dp"
58+
android:visibility="gone" />
59+
<com.rising.settings.fragments.lockscreen.DummyWeatherTextView
60+
android:id="@+id/miui_weather_text"
61+
android:layout_width="wrap_content"
62+
android:layout_height="wrap_content"
63+
android:layout_marginStart="4dp"
64+
android:layout_marginEnd="8dp"
65+
android:fontFamily="@*android:string/config_clockFontFamily"
66+
android:textColor="@android:color/white"
67+
android:textSize="20dp"
68+
android:visibility="gone"
69+
android:textAllCaps="true" />
70+
</LinearLayout>
71+
4572
</LinearLayout>
4673
</LinearLayout>

res/layout/keyguard_clock_moto.xml

Lines changed: 59 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,74 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<LinearLayout
3-
xmlns:android="http://schemas.android.com/apk/res/android"
4-
android:gravity="center"
5-
android:layout_gravity="center_horizontal"
6-
android:orientation="vertical"
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
74
android:layout_width="match_parent"
8-
android:layout_height="wrap_content">
5+
android:layout_height="wrap_content"
6+
android:layout_gravity="center_horizontal|top"
7+
android:gravity="center_horizontal|top"
8+
android:orientation="vertical">
9+
910
<LinearLayout
10-
android:layout_gravity="center_horizontal"
11-
android:orientation="vertical"
1211
android:layout_width="match_parent"
1312
android:layout_height="wrap_content"
14-
android:layout_marginTop="40dp"
15-
android:layout_marginHorizontal="20dp">
13+
android:layout_gravity="center_horizontal"
14+
android:orientation="vertical">
15+
1616
<TextClock
17-
android:textSize="100dp"
18-
android:textStyle="bold"
19-
android:textColor="@android:color/white"
20-
android:layout_marginBottom="8dp"
21-
android:gravity="center"
17+
android:id="@+id/clock"
2218
android:layout_width="match_parent"
2319
android:layout_height="wrap_content"
20+
android:alpha="0.9"
21+
android:layout_marginBottom="8dp"
22+
android:fontFamily="@*android:string/config_clockFontFamily"
23+
android:format12Hour="hh:mm"
24+
android:format24Hour="HH:mm"
25+
android:gravity="center"
2426
android:singleLine="true"
27+
android:tag="text1"
2528
android:textAlignment="center"
26-
android:format12Hour="hh:mm"
27-
android:format24Hour="HH:mm"/>
28-
<TextClock
29-
android:textSize="20dp"
3029
android:textColor="@android:color/white"
31-
android:gravity="center"
30+
android:textSize="100dp"
31+
android:textStyle="bold" />
32+
33+
<LinearLayout
3234
android:layout_width="match_parent"
3335
android:layout_height="wrap_content"
34-
android:singleLine="true"
35-
android:textAlignment="center"
36-
android:format12Hour="EEE, MMM d"
37-
android:format24Hour="EEE, d MMM"/>
36+
android:gravity="center">
37+
38+
<TextClock
39+
android:id="@+id/date"
40+
android:layout_width="wrap_content"
41+
android:layout_height="wrap_content"
42+
android:format12Hour="EEE, MMM d"
43+
android:format24Hour="EEE, d MMM"
44+
android:gravity="center"
45+
android:singleLine="true"
46+
android:tag="text1|nolineheight"
47+
android:textAlignment="center"
48+
android:textColor="@android:color/white"
49+
android:fontFamily="@*android:string/config_clockFontFamily"
50+
android:textSize="20dp" />
51+
52+
<com.rising.settings.fragments.lockscreen.DummyWeatherImageView
53+
android:id="@+id/weather_image"
54+
android:layout_width="wrap_content"
55+
android:layout_height="wrap_content"
56+
android:fontFamily="@*android:string/config_clockFontFamily"
57+
android:layout_marginStart="8dp"
58+
android:layout_marginEnd="4dp"
59+
android:visibility="gone" />
60+
61+
<com.rising.settings.fragments.lockscreen.DummyWeatherTextView
62+
android:id="@+id/weather_text"
63+
android:layout_width="wrap_content"
64+
android:layout_height="wrap_content"
65+
android:layout_marginStart="4dp"
66+
android:layout_marginEnd="8dp"
67+
android:fontFamily="@*android:string/config_clockFontFamily"
68+
android:textColor="@android:color/white"
69+
android:textSize="20dp"
70+
android:visibility="gone" />
71+
</LinearLayout>
72+
3873
</LinearLayout>
3974
</LinearLayout>

res/layout/keyguard_clock_oos.xml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,31 @@
6565
android:textAlignment="viewStart"
6666
android:format12Hour="MMMM dd "
6767
android:format24Hour="MMMM dd "/>
68+
69+
<LinearLayout
70+
android:layout_width="match_parent"
71+
android:layout_height="wrap_content"
72+
android:orientation="horizontal"
73+
android:gravity="start|center">
74+
75+
<com.rising.settings.fragments.lockscreen.DummyWeatherImageView
76+
android:id="@+id/weather_image"
77+
android:layout_width="wrap_content"
78+
android:layout_height="wrap_content"
79+
android:fontFamily="@*android:string/config_clockFontFamily"
80+
android:visibility="gone"
81+
android:layout_marginEnd="4dp" />
82+
83+
<com.rising.settings.fragments.lockscreen.DummyWeatherTextView
84+
android:id="@+id/weather_text"
85+
android:layout_width="wrap_content"
86+
android:layout_height="wrap_content"
87+
android:layout_marginStart="4dp"
88+
android:layout_marginEnd="8dp"
89+
android:fontFamily="@*android:string/config_clockFontFamily"
90+
android:textColor="@android:color/white"
91+
android:visibility="gone"
92+
android:textSize="20dp" />
93+
</LinearLayout>
6894
</LinearLayout>
69-
</LinearLayout>
95+
</LinearLayout>

res/layout/keyguard_clock_simple.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@
3939
android:fontFamily="@*android:string/config_clockFontFamily"
4040
android:textSize="20sp" />
4141

42+
<com.rising.settings.fragments.lockscreen.DummyWeatherImageView
43+
android:id="@+id/weather_image"
44+
android:layout_width="wrap_content"
45+
android:layout_height="wrap_content"
46+
android:layout_marginEnd="4dp"
47+
android:visibility="gone" />
48+
49+
<com.rising.settings.fragments.lockscreen.DummyWeatherTextView
50+
android:id="@+id/weather_text"
51+
android:layout_width="wrap_content"
52+
android:layout_height="wrap_content"
53+
android:layout_marginStart="4dp"
54+
android:textColor="@android:color/white"
55+
android:fontFamily="@*android:string/config_clockFontFamily"
56+
android:visibility="gone"
57+
android:textSize="20sp" />
4258
</LinearLayout>
4359

4460
</LinearLayout>

0 commit comments

Comments
 (0)