Cherish: Add support for Lockscreen clock fonts
After r16, a commit to cleanup the KeyguardClockSwtich and unify it's structure was merged. Also, this added a new resource into the frameworks core, which allows us to overlay the custom clock font. So, we need to overlays now to customize this. This makes me really happy because it removes the ugly method that we were doing years ago. [nurkeinneid]: - adapt to our ThemeUtils - restore original copyright header - crdroid did nothing here Change-Id: I70590910144141a534b926f884e9f08e4e3af5bc Signed-off-by: NurKeinNeid <mralexman3000@gmail.com> Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
50
res/layout/lock_clock_fonts_option.xml
Normal file
50
res/layout/lock_clock_fonts_option.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2019 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="7dp"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/option_tile"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingVertical="10dp"
|
||||
android:background="@drawable/option_border_custom">
|
||||
|
||||
<TextClock android:id="@+id/option_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:format12Hour="hh:mm"
|
||||
android:format24Hour="kk:mm"
|
||||
android:textAppearance="@style/OptionTitleTextAppearance"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/option_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:textAppearance="@style/OptionTitleTextAppearance"/>
|
||||
</LinearLayout>
|
||||
@@ -148,6 +148,10 @@
|
||||
<string name="theme_customization_signal_icon_summary">Set custom signal icon style</string>
|
||||
<string name="theme_customization_wifi_icon_title">WiFi icon style</string>
|
||||
<string name="theme_customization_wifi_icon_summary">Set custom wifi icon style</string>
|
||||
|
||||
<!-- Fonts -->
|
||||
<string name="theme_customization_lock_clock_title">Lockscreen clock font</string>
|
||||
<string name="theme_customization_lock_clock_summary">Set LS clock font style</string>
|
||||
|
||||
<!-- Custom Signal bar icons -->
|
||||
<string name="custom_signal_bar_title">Signal</string>
|
||||
|
||||
@@ -92,6 +92,12 @@
|
||||
android:title="@string/theme_customization_ui_style_title"
|
||||
android:summary="@string/theme_customization_ui_style_summary"
|
||||
android:fragment="com.cherish.settings.fragments.ui.UIStyles"/>
|
||||
|
||||
<Preference
|
||||
android:key="android.theme.customization.lockscreen_clock_font"
|
||||
android:title="@string/theme_customization_lock_clock_title"
|
||||
android:summary="@string/theme_customization_lock_clock_summary"
|
||||
android:fragment="com.cherish.settings.fragments.ui.LockClockFonts"/>
|
||||
|
||||
<!-- QS style -->
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
|
||||
Reference in New Issue
Block a user