Cherish: Bring back icon shapes, icon packs, fonts customization
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com> Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
25
res/color/option_border_color.xml
Normal file
25
res/color/option_border_color.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:state_activated="true"
|
||||
android:color="?android:colorAccent" />
|
||||
<item
|
||||
android:state_activated="false"
|
||||
android:alpha="0.24"
|
||||
android:color="?android:colorAccent" />
|
||||
<item
|
||||
android:alpha="0.05"
|
||||
android:color="@color/option_border_default"/>
|
||||
</selector>
|
||||
19
res/drawable/icon_background.xml
Normal file
19
res/drawable/icon_background.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2017 AospExtended ROM 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.
|
||||
-->
|
||||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="100dp" />
|
||||
<solid android:color="#FFF" />
|
||||
</shape>
|
||||
21
res/drawable/option_border_custom.xml
Normal file
21
res/drawable/option_border_custom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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.
|
||||
-->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/shape">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?android:attr/colorPrimary"/>
|
||||
<corners android:radius="?android:dialogCornerRadius" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:drawable="@drawable/option_border_edge_custom" />
|
||||
</layer-list>
|
||||
31
res/drawable/option_border_edge_custom.xml
Normal file
31
res/drawable/option_border_edge_custom.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_activated="true">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke
|
||||
android:color="@color/option_border_color"
|
||||
android:width="4dp" />
|
||||
<corners android:radius="?android:dialogCornerRadius" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_activated="false">
|
||||
<shape android:shape="rectangle">
|
||||
<stroke
|
||||
android:color="@color/option_border_color"
|
||||
android:width="4dp" />
|
||||
<corners android:radius="?android:dialogCornerRadius" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
48
res/layout/fonts_option.xml
Normal file
48
res/layout/fonts_option.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?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">
|
||||
|
||||
<TextView android:id="@+id/option_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
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>
|
||||
88
res/layout/icon_option.xml
Normal file
88
res/layout/icon_option.xml
Normal file
@@ -0,0 +1,88 @@
|
||||
<?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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="5dp"
|
||||
android:paddingVertical="5dp"
|
||||
android:background="@drawable/option_border_custom">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image1"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/icon_background"
|
||||
android:backgroundTint="?android:attr/textColorSecondary"
|
||||
android:tint="?android:attr/textColorPrimary" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image2"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/icon_background"
|
||||
android:backgroundTint="?android:attr/textColorSecondary"
|
||||
android:tint="?android:attr/textColorPrimary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image3"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/icon_background"
|
||||
android:backgroundTint="?android:attr/textColorSecondary"
|
||||
android:tint="?android:attr/textColorPrimary" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image4"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/icon_background"
|
||||
android:backgroundTint="?android:attr/textColorSecondary"
|
||||
android:tint="?android:attr/textColorSecondary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<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>
|
||||
42
res/layout/item_option.xml
Normal file
42
res/layout/item_option.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingVertical="10dp"
|
||||
android:background="@drawable/option_border_custom">
|
||||
<ImageView
|
||||
android:id="@+id/option_thumbnail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</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>
|
||||
17
res/layout/item_view.xml
Normal file
17
res/layout/item_view.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="7dp"
|
||||
android:paddingRight="7dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="none"
|
||||
android:gravity="center"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -536,11 +536,13 @@
|
||||
<!-- [CHAR_LIMIT=NONE] Developer Settings: Title of the setting which enables overlays to customize the adaptive icon shape (e.g. launcher and quick settings icons). -->
|
||||
<string name="theme_customization_icon_shape_title">Icon shape</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Developer Settings: Title of the setting which enables overlays to customize accent color. -->
|
||||
<string name="theme_customization_accent_color_title">Accent color</string>
|
||||
<string name="theme_customization_icon_shape_summary">Set system icon shape style</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Developer Settings: Title of the setting which enables overlays to customize headline and body fonts. -->
|
||||
<string name="theme_customization_font_title">Headline / Body font</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Developer Settings: Title of the setting which enables overlays to customize the statusbar icon -->
|
||||
<string name="theme_customization_sysui_icon_title">Statusbar icon</string>
|
||||
<string name="theme_customization_font_summary">Set system font style</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Developer Settings: Title of the setting which enables overlays to customize the system wide icon pack. -->
|
||||
<string name="theme_customization_icon_pack_title">Icon pack</string>
|
||||
<string name="theme_customization_icon_pack_summary">Set custom icon pack style</string>
|
||||
|
||||
<!-- Custom Signal bar icons -->
|
||||
<string name="custom_signal_bar_title">Signal</string>
|
||||
|
||||
@@ -22,4 +22,5 @@
|
||||
<dimen name="fod_picker_item_size">100dp</dimen>
|
||||
<dimen name="fod_picker_item_padding">20dp</dimen>
|
||||
|
||||
<color name="option_border_default">#5f6368</color>
|
||||
</resources>
|
||||
|
||||
21
res/values/colors.xml
Normal file
21
res/values/colors.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2014-2016 The Dirty Unicorns Project
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
|
||||
<color name="google_grey700">#5f6368</color>
|
||||
<color name="edit_background_base">@color/google_grey700</color>
|
||||
<color name="option_border_default">@color/edit_background_base</color>
|
||||
|
||||
</resources>
|
||||
21
res/values/styles.xml
Normal file
21
res/values/styles.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 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.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<style name="OptionTitleTextAppearance" parent="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title">
|
||||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:textSize">15sp</item>
|
||||
<item name="android:lineHeight">15sp</item>
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -28,17 +28,26 @@
|
||||
android:fragment="com.android.settings.display.darkmode.DarkModeSettingsFragment"
|
||||
settings:controller="com.android.settings.display.DarkUIPreferenceController" />
|
||||
|
||||
<ListPreference
|
||||
<!-- Font style -->
|
||||
<Preference
|
||||
android:key="android.theme.customization.font"
|
||||
android:title="@string/theme_customization_font_title"/>
|
||||
android:title="@string/theme_customization_font_title"
|
||||
android:summary="@string/theme_customization_font_summary"
|
||||
android:fragment="com.cherish.settings.fragments.ui.FontsPicker"/>
|
||||
|
||||
<ListPreference
|
||||
android:key="android.theme.customization.adaptive_icon_shape"
|
||||
android:title="@string/theme_customization_icon_shape_title"/>
|
||||
|
||||
<ListPreference
|
||||
<!-- Icon pack -->
|
||||
<Preference
|
||||
android:key="android.theme.customization.icon_pack"
|
||||
android:title="@string/theme_customization_sysui_icon_title"/>
|
||||
android:title="@string/theme_customization_icon_pack_title"
|
||||
android:summary="@string/theme_customization_icon_pack_summary"
|
||||
android:fragment="com.cherish.settings.fragments.ui.StatusbarIcons"/>
|
||||
|
||||
<!-- Adaptive icon shape -->
|
||||
<Preference
|
||||
android:key="android.theme.customization.adaptive_icon_shape"
|
||||
android:title="@string/theme_customization_icon_shape_title"
|
||||
android:summary="@string/theme_customization_icon_shape_summary"
|
||||
android:fragment="com.cherish.settings.fragments.ui.IconShapes"/>
|
||||
|
||||
<ListPreference
|
||||
android:key="android.theme.customization.signal_icon"
|
||||
|
||||
Reference in New Issue
Block a user