Skip to content

Commit

Permalink
Fix lockscreen clock previews
Browse files Browse the repository at this point in the history
Signed-off-by: DrDisagree <[email protected]>
  • Loading branch information
Mahmud0808 committed Oct 25, 2024
1 parent 1014498 commit 29b4c8b
Show file tree
Hide file tree
Showing 22 changed files with 80 additions and 96 deletions.
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/lockscreen_clock_24_bg.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#33FFFFFF" />
<solid android:color="#33000000" />
<corners android:radius="24dp" />
</shape>
8 changes: 4 additions & 4 deletions app/src/main/res/drawable/lockscreen_clock_50_dot.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<stroke android:width="0.0dip" android:color="#c5000000" />
<corners android:radius="100.0dip" />
<solid android:color="#ffffff" />
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="100dp" />
<solid android:color="#FFFFFF" />
</shape>
8 changes: 4 additions & 4 deletions app/src/main/res/drawable/lockscreen_clock_50_dot2.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<stroke android:width="0.0dip" android:color="#c5000000" />
<corners android:radius="20.0dip" />
<solid android:color="?android:colorAccent" />
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="20dp" />
<solid android:color="@android:color/system_accent1_600" />
</shape>
Binary file removed app/src/main/res/font/japanese.ttf
Binary file not shown.
Binary file added app/src/main/res/font/montserrat_bold.ttf
Binary file not shown.
File renamed without changes.
2 changes: 1 addition & 1 deletion app/src/main/res/layout/preview_lockscreen_clock_19.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:alpha="0.9"
android:fontFamily="@font/ios"
android:fontFamily="@font/sf_pro_stencil"
android:format12Hour="hh:mm"
android:format24Hour="HH:mm"
android:gravity="center"
Expand Down
62 changes: 29 additions & 33 deletions app/src/main/res/layout/preview_lockscreen_clock_2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
android:orientation="vertical">

<TextClock
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:format12Hour="EEEE"
android:format24Hour="EEEE"
android:includeFontPadding="false"
android:singleLine="true"
android:tag="text1|nolineheight"
android:includeFontPadding="false"
android:textAlignment="viewStart"
android:textColor="@android:color/white"
android:textSize="36dp" />

<TextView
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:singleLine="true"
Expand All @@ -36,44 +36,39 @@
android:textColor="@android:color/white"
android:textSize="30sp" />

<LinearLayout
android:layout_width="match_parent"
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start">
android:layout_gravity="start"
android:layoutDirection="ltr">

<FrameLayout
<TextClock
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layoutDirection="ltr">
android:format12Hour="hh:mm"
android:format24Hour="HH:mm"
android:includeFontPadding="false"
android:singleLine="true"
android:tag="text1"
android:textColor="@android:color/white"
android:textSize="40dp" />

<TextClock
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:format12Hour="hh:mm"
android:format24Hour="HH:mm"
android:includeFontPadding="false"
android:singleLine="true"
android:tag="text1"
android:textColor="@android:color/white"
android:textSize="40dp" />
<TextClock
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:format12Hour="hh:mm"
android:format24Hour="HH:mm"
android:includeFontPadding="false"
android:maxLength="1"
android:singleLine="true"
android:tag="accent1"
android:textColor="@android:color/system_accent1_300"
android:textSize="40dp" />

<TextClock
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:format12Hour="hh:mm"
android:format24Hour="HH:mm"
android:includeFontPadding="false"
android:maxLength="1"
android:singleLine="true"
android:tag="accent1"
android:textColor="@android:color/system_accent1_300"
android:textSize="40dp" />
</FrameLayout>
</LinearLayout>
</FrameLayout>

<TextClock
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:format12Hour="MMMM dd "
android:format24Hour="dd MMMM "
Expand All @@ -83,5 +78,6 @@
android:textAlignment="viewStart"
android:textColor="@android:color/white"
android:textSize="20dp" />

</LinearLayout>
</LinearLayout>
10 changes: 6 additions & 4 deletions app/src/main/res/layout/preview_lockscreen_clock_28.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,26 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|center"
app:cardBackgroundColor="@android:color/system_accent1_300"
app:cardBackgroundColor="@android:color/system_accent1_200"
app:cardCornerRadius="18dp"
app:strokeColor="@android:color/system_accent3_900"
app:strokeWidth="6dp">
app:strokeColor="@android:color/system_accent1_900"
app:strokeWidth="4dp">

<TextClock
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginHorizontal="48dp"
android:layout_marginVertical="16dp"
android:fontFamily="@font/detoks"
android:format12Hour="EEEE"
android:format24Hour="EEEE"
android:gravity="center"
android:includeFontPadding="false"
android:letterSpacing="0.1"
android:tag="text2|nolineheight"
android:textColor="#000000"
android:textSize="40sp"
android:textSize="28sp"
android:textStyle="bold" />

</com.google.android.material.card.MaterialCardView>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/preview_lockscreen_clock_29.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
android:layout_height="wrap_content"
android:layout_marginBottom="-2dp"
android:includeFontPadding="false"
android:tag="accent1|nolineheight"
android:text="Oni Chan!!"
android:tag="accent1|nolineheight|username"
android:text="Onii-Chan!!"
android:textColor="@android:color/system_accent1_300"
android:textSize="22sp" />

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/preview_lockscreen_clock_3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:alpha="0.9"
android:fontFamily="@font/ios"
android:fontFamily="@font/sf_pro_stencil"
android:format12Hour="hh:mm"
android:format24Hour="HH:mm"
android:gravity="center"
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/layout/preview_lockscreen_clock_33.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
android:format12Hour="EEEE"
android:format24Hour="EEEE"
android:includeFontPadding="false"
android:letterSpacing="0.1"
android:tag="text2|nolineheight"
android:textColor="#000000"
android:textSize="20sp"
Expand Down Expand Up @@ -68,16 +69,16 @@
android:layout_height="wrap_content"
android:layout_gravity="end|center"
android:background="@drawable/lockscreen_clock_33_bg"
android:paddingHorizontal="20dp"
android:paddingHorizontal="30dp"
android:paddingVertical="10dp"
android:tag="accent1">

<TextClock
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:format12Hour="hhmm"
android:format24Hour="kk • mm"
android:format12Hour="hh:mm"
android:format24Hour="HH:mm"
android:includeFontPadding="false"
android:tag="text2|nolineheight"
android:textColor="#000000"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/preview_lockscreen_clock_37.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="4dp"
android:gravity="center"
android:orientation="vertical">

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/preview_lockscreen_clock_40.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:layout_height="wrap_content"
android:layout_gravity="start|center"
android:layout_marginStart="12dp"
android:fontFamily="@font/japanese"
android:fontFamily="@font/japanese3017"
android:format12Hour="hh : mm"
android:format24Hour="HH : mm"
android:includeFontPadding="false"
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/res/layout/preview_lockscreen_clock_42.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="6dp"
android:layout_marginBottom="10dp"
android:padding="10dp">
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp">

<ImageView
android:layout_width="50dp"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/preview_lockscreen_clock_45.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
android:layout_marginStart="5dp"
android:orientation="vertical">

<LinearLayout
<View
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_gravity="top"
Expand All @@ -63,7 +63,7 @@
android:textColor="@android:color/system_accent1_600"
android:textSize="30sp" />

<LinearLayout
<View
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_gravity="bottom"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/preview_lockscreen_clock_46.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|center"
android:layout_marginTop="4dp"
android:layout_marginTop="6dp"
android:format12Hour="hh • mm | MMM dd"
android:format24Hour="HH • mm | dd MMM"
android:includeFontPadding="false"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/preview_lockscreen_clock_48.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginHorizontal="48dp"
android:layout_marginTop="-18dp"
android:layout_marginTop="-14dp"
android:fontFamily="@font/montserrat"
android:format12Hour="EEEE"
android:format24Hour="EEEE"
Expand All @@ -78,6 +78,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginHorizontal="48dp"
android:layout_marginTop="2dp"
android:layout_marginBottom="18dp"
android:alpha="0.6"
android:fontFamily="@font/montserrat"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/preview_lockscreen_clock_50.xml
Original file line number Diff line number Diff line change
Expand Up @@ -421,20 +421,20 @@
android:layout_marginTop="16dp"
android:orientation="horizontal">

<LinearLayout
<View
android:layout_width="10dp"
android:layout_height="10dp"
android:background="@drawable/lockscreen_clock_50_dot"
android:orientation="horizontal" />

<LinearLayout
<View
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginStart="5dp"
android:background="@drawable/lockscreen_clock_50_dot2"
android:orientation="horizontal" />

<LinearLayout
<View
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_marginStart="5dp"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/preview_lockscreen_clock_51.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:alpha="0.5"
android:fontFamily="@font/sans_bold"
android:fontFamily="@font/montserrat_bold"
android:format12Hour="hh mm"
android:format24Hour="HH mm"
android:includeFontPadding="false"
Expand All @@ -37,7 +37,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="@font/sans_bold"
android:fontFamily="@font/montserrat_bold"
android:format12Hour="EEEE"
android:format24Hour="EEEE"
android:gravity="center"
Expand All @@ -54,7 +54,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="-20dp"
android:fontFamily="@font/sans_bold"
android:fontFamily="@font/montserrat_bold"
android:format12Hour="dd MMMM yyyy"
android:format24Hour="dd MMMM yyyy"
android:includeFontPadding="false"
Expand Down
32 changes: 8 additions & 24 deletions app/src/main/res/layout/preview_lockscreen_clock_54.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,36 +154,20 @@
android:textSize="22sp"
android:textStyle="bold" />

<LinearLayout
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginTop="1dp"
android:gravity="center"
android:orientation="horizontal"
android:rotation="15">

<View
android:layout_width="2dp"
android:layout_height="15dp"
android:background="@android:color/system_accent1_400"
android:orientation="horizontal"
android:tag="accent1" />

<View
android:layout_width="2dp"
android:layout_height="15dp"
android:layout_marginStart="4dp"
android:background="@android:color/system_accent1_400"
android:orientation="horizontal"
android:tag="accent1" />

</LinearLayout>
android:includeFontPadding="false"
android:tag="accent1"
android:text=" // "
android:textColor="@android:color/system_accent1_400"
android:textSize="22sp"
android:textStyle="bold" />

<TextClock
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_gravity="bottom"
android:fontFamily="@font/lovelo"
android:format12Hour="MMMM"
android:format24Hour="MMMM"
Expand Down
Loading

0 comments on commit 29b4c8b

Please sign in to comment.