[app] Separate themes

This commit is contained in:
tehcneko 2021-02-13 16:41:27 +08:00
parent 0c7b1bb340
commit bcb783586e
30 changed files with 194 additions and 289 deletions

View File

@ -43,6 +43,7 @@ import io.github.lsposed.manager.util.ModuleUtil;
import io.github.lsposed.manager.util.NavUtil;
import name.mikanoshi.customiuizer.holidays.HolidayHelper;
import name.mikanoshi.customiuizer.utils.Helpers;
import rikka.core.res.ResourcesKt;
public class MainActivity extends BaseActivity {
ActivityMainBinding binding;
@ -79,19 +80,18 @@ public class MainActivity extends BaseActivity {
if (!Constants.isPermissive()) {
if (Helpers.currentHoliday == Helpers.Holidays.LUNARNEWYEAR) {
cardBackgroundColor = 0xfff05654;
} else {
cardBackgroundColor = ContextCompat.getColor(this, R.color.colorNormal);
cardBackgroundColor = ResourcesKt.resolveColor(getTheme(), R.attr.colorNormal);
}
binding.statusIcon.setImageResource(R.drawable.ic_check_circle);
binding.statusSummary.setText(String.format(Locale.US, "%s (%d)", installedXposedVersion, Constants.getXposedVersionCode()));
} else {
cardBackgroundColor = ContextCompat.getColor(this, R.color.colorError);
cardBackgroundColor = ResourcesKt.resolveColor(getTheme(), R.attr.colorError);
binding.statusIcon.setImageResource(R.drawable.ic_warning);
binding.statusSummary.setText(R.string.selinux_permissive_summary);
}
} else {
cardBackgroundColor = ContextCompat.getColor(this, R.color.colorInstall);
cardBackgroundColor = ResourcesKt.resolveColor(getTheme(), R.attr.colorInstall);
binding.statusTitle.setText(R.string.Install);
binding.statusSummary.setText(R.string.InstallDetail);
binding.statusIcon.setImageResource(R.drawable.ic_error);
@ -127,7 +127,6 @@ public class MainActivity extends BaseActivity {
@Override
protected void onResume() {
super.onResume();
binding.modulesSummary.setText(String.format(getString(R.string.ModulesDetail), ModuleUtil.getInstance().getEnabledModules().size()));
HolidayHelper.onResume();

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of LSPosed.
~
~ LSPosed is free software: you can redistribute it and/or modify

View File

@ -30,7 +30,7 @@
android:left="8dp"
android:top="4dp">
<shape android:shape="rectangle">
<solid android:color="@color/selectorTransparency" />
<solid android:color="?rippleTransparency" />
<corners android:radius="8dp" />
</shape>
</item>

View File

@ -108,7 +108,7 @@
android:id="@+id/tgChannelView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?roundBackground"
android:background="@drawable/item_background"
android:clickable="true"
android:focusable="true"
android:gravity="center"
@ -137,7 +137,7 @@
android:id="@+id/sourceCodeView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?roundBackground"
android:background="@drawable/item_background"
android:clickable="true"
android:focusable="true"
android:gravity="center"

View File

@ -53,8 +53,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/tab_layout_height"
android:background="@android:color/transparent"
app:tabMode="fixed"
style="?tabLayoutTheme">
app:tabMode="fixed">
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"

View File

@ -120,7 +120,7 @@
android:layout_height="28dp"
android:layout_centerVertical="true"
app:srcCompat="@drawable/ic_check_circle"
app:tint="@android:color/white" />
app:tint="?android:attr/textColorPrimaryInverse" />
<TextView
android:id="@+id/status_title"
@ -129,7 +129,7 @@
android:layout_marginStart="25dp"
android:layout_toEndOf="@id/status_icon"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@android:color/white" />
android:textColor="?android:attr/textColorPrimaryInverse" />
<TextView
android:id="@+id/status_summary"
@ -139,7 +139,7 @@
android:layout_alignStart="@id/status_title"
android:layout_marginTop="5dp"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="@android:color/white" />
android:textColor="?android:attr/textColorPrimaryInverse" />
</RelativeLayout>
</com.google.android.material.card.MaterialCardView>

View File

@ -50,8 +50,7 @@
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="@dimen/tab_layout_height"
android:background="@android:color/transparent"
style="?tabLayoutTheme" />
android:background="@android:color/transparent" />
</LinearLayout>
</rikka.material.widget.AppBarLayout>

View File

@ -23,7 +23,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?listItemBackground"
android:background="@drawable/item_background"
android:clickable="true"
android:focusable="true"
android:minHeight="?attr/listPreferredItemHeight"

View File

@ -23,7 +23,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?listItemBackground"
android:background="@drawable/item_background"
android:clickable="true"
android:focusable="true"
android:minHeight="?attr/listPreferredItemHeight"

View File

@ -23,7 +23,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?listItemBackground"
android:background="@drawable/item_background"
android:clickable="true"
android:focusable="true"
android:minHeight="?attr/listPreferredItemHeight"

View File

@ -23,7 +23,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?listItemBackground"
android:background="@drawable/item_background"
android:clickable="true"
android:focusable="true"
android:minHeight="?attr/listPreferredItemHeight"

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ This file is part of LSPosed.
~
~ LSPosed 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.
~
~ LSPosed 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 LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2020 EdXposed Contributors
~ Copyright (C) 2021 LSPosed Contributors
-->
<resources>
<color name="navigationBarColor">@android:color/transparent</color>
</resources>

View File

@ -21,6 +21,4 @@
<resources>
<bool name="lightSystemUI">false</bool>
</resources>

View File

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ This file is part of LSPosed.
~
~ LSPosed 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.
~
~ LSPosed 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 LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2020 EdXposed Contributors
~ Copyright (C) 2021 LSPosed Contributors
-->
<resources>
<color name="colorPrimary">@color/material_blue_700</color>
<color name="colorBackground">#303030</color>
<color name="colorPrimaryDark">#2E2E2E</color>
<color name="colorActionBar">#383838</color>
<color name="selectorTransparency">#cbffffff</color>
<color name="navigationBarColor">#B3000000</color>
<color name="colorError">@color/material_red_700</color>
<color name="colorNormal">@color/material_green_700</color>
<color name="colorInstall">@color/material_blue_700</color>
</resources>

View File

@ -19,5 +19,6 @@
-->
<resources>
<style name="AppTheme" parent="Theme"/>
<style name="AppTheme" parent="Theme" />
</resources>

View File

@ -36,7 +36,6 @@
<string name="android_sdk">Android %2$s (%1$s, API %3$d)</string>
<string name="app_destroyed">Эта программа прекратила работу, пожалуйста, убедитесь, что загрузили ее из официального источника.</string>
<string name="app_launch">Запустить</string>
<string name="colorized_action_bar">Цветной ActionBar</string>
<string name="compile_failed">Ошибка оптимиз<D0B8><D0B7>ции или возвращено пустое значение</string>
<string name="compile_failed_with_info">Ошибка оптимизации:</string>
<string name="compile_speed">Повторная оптимизация</string>
@ -54,7 +53,6 @@
<string name="logs_cleared">Логи успешно очищены.</string>
<string name="logs_save_failed">Не удалось сохранить:</string>
<string name="lsposed_not_active">LSPosed пока не установлен или не активен.</string>
<string name="material_design_2">Material Design 2</string>
<string name="menuClearLog">Очистить логи сейчас</string>
<string name="menuReload">Перезагрузить</string>
<string name="menuSaveToSd">Сохранить</string>
@ -118,7 +116,6 @@
<string name="sort_by_package_name_reverse">Сортировать по названию пакета (обратный)</string>
<string name="sort_by_update_time">Сортировать по времени обновления</string>
<string name="sort_by_update_time_reverse">Сортировать по времени обновления (обратный)</string>
<string name="transparent_status_bar">Прозрачная строка состояния</string>
<string name="use_recommended">Рекомендуется</string>
<string name="use_recommended_message">Выбрать рекомендуемые приложения?</string>
<string name="warning_installed_on_external_storage">Этот модуль нельзя загрузить, поскольку он установлен на SD-карте, перенесите его во внутреннюю память</string>

View File

@ -34,7 +34,6 @@
<string name="android_sdk">Android %2$s (%1$s, API %3$d)</string>
<string name="app_destroyed">Ця програма припинила роботу, будь ласка, переконайтесь, що завантажили її з офіційного джерела.</string>
<string name="app_launch">Запустити</string>
<string name="colorized_action_bar">Кольоровий ActionBar</string>
<string name="compile_failed">Помилка оптимізації або повернене значення порожнє</string>
<string name="compile_failed_with_info">Помилка оптимізації:</string>
<string name="compile_speed">Повторна оптимізація</string>
@ -54,7 +53,6 @@
<string name="logs_cleared">Звіт успішно очищено.</string>
<string name="logs_save_failed">Не вдалося зберегти:</string>
<string name="lsposed_not_active">LSPosed наразі не встановлений або не активний.</string>
<string name="material_design_2">Material Design 2</string>
<string name="menuClearLog">Очистити звіт зараз</string>
<string name="menuReload">Перезавантажити</string>
<string name="menuSaveToSd">Зберегти</string>
@ -118,7 +116,6 @@
<string name="sort_by_package_name_reverse">Сортувати за назвою пакету (зворотній)</string>
<string name="sort_by_update_time">Сортувати за часом оновлення</string>
<string name="sort_by_update_time_reverse">Сортувати за часом оновлення (зворотній)</string>
<string name="transparent_status_bar">Прозорий рядок стану</string>
<string name="use_recommended">Рекомендовано</string>
<string name="use_recommended_message">Вибрати рекомендовані програми?</string>
<string name="warning_installed_on_external_storage">Цей модуль не можна завантажити, оскільки він встановлений на SD-карті, перенесіть його у внутрішню пам’ять</string>

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ This file is part of LSPosed.
~
~ LSPosed 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.
~
~ LSPosed 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 LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2020 EdXposed Contributors
~ Copyright (C) 2021 LSPosed Contributors
-->
<resources>
<color name="navigationBarColor">#B3FFFFFF</color>
</resources>

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ This file is part of LSPosed.
~
~ LSPosed 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.
~
~ LSPosed 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 LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2020 EdXposed Contributors
~ Copyright (C) 2021 LSPosed Contributors
-->
<resources>
<color name="navigationBarColor">@android:color/transparent</color>
<color name="navigationBarColorBlack">@android:color/transparent</color>
</resources>

View File

@ -106,7 +106,6 @@
<string name="not_installed">未安装</string>
<string name="follow_system">跟随系统</string>
<string name="pure_black_dark_theme">使用纯黑深色主题</string>
<string name="transparent_status_bar">透明状态栏</string>
<string name="sort_by_name">应用名称</string>
<string name="sort_by_name_reverse">应用名称(降序)</string>
<string name="sort_by_package_name">包体名称</string>
@ -117,9 +116,7 @@
<string name="sort_by_update_time_reverse">更新时间(降序)</string>
<string name="primary_color">主要色</string>
<string name="accent_color">强调色</string>
<string name="colorized_action_bar">着色应用栏</string>
<string name="settings_group_theme">主题</string>
<string name="material_design_2">惨白设计</string>
<string name="settings_enable_resources">启用资源钩子</string>
<string name="settings_enable_resources_summary"><b>警告: </b> 资源钩子已被弃用</string>
<string name="settings_variant">变体</string>

View File

@ -104,8 +104,8 @@
<string name="follow_system">跟隨系統</string>
<string name="pure_black_dark_theme">使用純黑深色主題</string><![CDATA[>
]]>
<string name="transparent_status_bar">透明狀態欄</string>
<string name="sort_by_name">應用名稱</string>
<string name="sort_by_name_reverse">應用名稱(降序)</string>
<string name="sort_by_package_name">包體名稱</string>
@ -116,6 +116,5 @@
<string name="sort_by_update_time_reverse">更新時間(降序)</string>
<string name="primary_color">主要色</string>
<string name="accent_color">強調色</string>
<string name="colorized_action_bar">着色應用欄</string>
<string name="settings_group_theme">主題</string>
</resources>

View File

@ -1,24 +1,4 @@
<!--
~ This file is part of LSPosed.
~
~ LSPosed 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.
~
~ LSPosed 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 LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2020 EdXposed Contributors
~ Copyright (C) 2021 LSPosed Contributors
-->
<resources xmlns:tools="http://schemas.android.com/tools" >
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="Activated">已啟用</string>
<string name="Install">安裝</string>
<string name="InstallDetail">點選安裝 LSPosed</string>
@ -111,7 +91,6 @@
<string name="not_installed">未安裝</string>
<string name="pure_black_dark_theme">使用純黑深色主題</string>
<string name="follow_system">跟隨系統</string>
<string name="transparent_status_bar">透明狀態列</string>
<string name="sort_by_name">程式名稱</string>
<string name="sort_by_name_reverse">程式名稱(降序)</string>
<string name="sort_by_package_name">包體名稱</string>
@ -122,9 +101,7 @@
<string name="sort_by_update_time_reverse">更新時間(降序)</string>
<string name="primary_color">主要色</string>
<string name="accent_color">強調色</string>
<string name="colorized_action_bar">著色應用程式欄位</string>
<string name="settings_group_theme">主題</string>
<string name="material_design_2">慘白設計</string>
<string name="settings_variant">變體</string>
<string name="menu_show_system_apps">系統程式</string>
<string name="menu_sort">排序…</string>

View File

@ -20,9 +20,7 @@
-->
<resources>
<attr name="listItemBackground" format="reference" />
<attr name="roundBackground" format="reference" />
<attr name="actionBarTheme" format="reference" />
<attr name="actionBarPopupTheme" format="reference" />
<attr name="tabLayoutTheme" format="reference" />
<attr name="rippleTransparency" format="color" />
<attr name="colorNormal" format="color" />
<attr name="colorInstall" format="color" />
</resources>

View File

@ -21,6 +21,4 @@
<resources>
<bool name="lightSystemUI">true</bool>
</resources>

View File

@ -21,15 +21,7 @@
<resources>
<color name="colorPrimary">@color/material_blue_700</color>
<color name="colorBackground">#fff</color>
<color name="colorPrimaryDark">#fff</color>
<color name="colorAccent">@color/material_blue_700</color>
<color name="colorActionBar">#fff</color>
<color name="selectorTransparency">#34ffffff</color>
<color name="navigationBarColor">@color/colorPrimary</color>
<color name="navigationBarColorBlack">@android:color/black</color>
<color name="colorError">@color/material_red_500</color>
<color name="colorNormal">@color/material_green_500</color>
<color name="colorInstall">@color/material_blue_500</color>
<color name="rippleTransparency_light">#34ffffff</color>
<color name="rippleTransparency_dark">#cbffffff</color>
</resources>

View File

@ -116,7 +116,6 @@
<string name="not_installed">Not installed</string>
<string name="pure_black_dark_theme">Use the pure black dark theme</string>
<string name="follow_system">Follow system</string>
<string name="transparent_status_bar">Transparent status bar</string>
<string name="sort_by_name">Sort by application name</string>
<string name="sort_by_name_reverse">Sort by application name (reverse)</string>
<string name="sort_by_package_name">Sort by package name</string>
@ -127,9 +126,7 @@
<string name="sort_by_update_time_reverse">Sort by update time (reverse)</string>
<string name="primary_color">Primary color</string>
<string name="accent_color">Accent color</string>
<string name="colorized_action_bar">Colorized action bar</string>
<string name="settings_group_theme">Theme</string>
<string name="material_design_2">Material Design 2</string>
<string name="settings_variant">Variant</string>
<string name="menu_show_system_apps">System apps</string>
<string name="menu_sort">Sorting…</string>

View File

@ -18,108 +18,7 @@
~ Copyright (C) 2021 LSPosed Contributors
-->
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>
<style name="AppTheme" parent="Theme.Light" />
<!-- Base application theme. -->
<style name="Base.AppTheme.Light" parent="Theme.Material.Light.LightStatusBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="listItemBackground">@drawable/item_background</item>
<item name="roundBackground">@drawable/item_background</item>
<item name="actionBarStyle">@style/Widget.Material.ActionBar.Surface</item>
<item name="actionBarTheme">@style/ThemeOverlay.ActionBar</item>
<item name="toolbarStyle">@style/Widget.Material.Toolbar</item>
<item name="appBarStyle">@style/Widget.AppBar.Surface.Raisable</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Base.AppTheme" parent="Theme.Material">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="listItemBackground">@drawable/item_background</item>
<item name="roundBackground">@drawable/item_background</item>
<item name="actionBarStyle">@style/Widget.Material.ActionBar.Surface</item>
<item name="actionBarTheme">@style/ThemeOverlay.ActionBar</item>
<item name="toolbarStyle">@style/Widget.Material.Toolbar</item>
<item name="appBarStyle">@style/Widget.AppBar.Surface.Raisable</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.Light" parent="Base.AppTheme.Light" />
<style name="Theme" parent="Base.AppTheme" />
<style name="Widget.AppBar" parent="">
<item name="android:background">?toolbarColor</item>
<item name="android:theme">?actionBarTheme</item>
<item name="android:stateListAnimator">@animator/raise_animator</item>
<item name="android:elevation">2dp</item>
</style>
<style name="Widget.Material.Toolbar" parent="Widget.MaterialComponents.Toolbar">
<item name="android:background">?android:colorBackground</item>
</style>
<style name="Widget.AppBar.Surface">
<item name="android:background">?android:colorBackground</item>
<item name="android:stateListAnimator">@animator/alpha_animator</item>
<item name="android:elevation">@dimen/app_bar_elevation</item>
</style>
<style name="Widget.AppBar.Surface.Raisable">
<item name="android:elevation">0dp</item>
<item name="android:stateListAnimator">@animator/raise_animator</item>
</style>
<style name="ThemeOverlay.ActionBar" parent="ThemeOverlay.MaterialComponents.ActionBar">
<item name="elevation">0dp</item>
<item name="titleTextAppearance">@android:style/TextAppearance.Material.Widget.Toolbar.Title</item>
<item name="subtitleTextAppearance">@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle</item>
</style>
<style name="Widget.App.Button.OutlinedButton.IconOnly" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="iconPadding">0dp</item>
<item name="android:paddingLeft">12dp</item>
<item name="android:paddingRight">12dp</item>
<item name="android:minWidth">48dp</item>
</style>
<style name="Widget.MaterialComponents.CompoundButton.CheckBox" parent="Widget.AppCompat.CompoundButton.CheckBox" tools:override="true">
<item name="enforceMaterialTheme">true</item>
<item name="useMaterialThemeColors">true</item>
</style>
<style name="Widget.MaterialComponents.CompoundButton.RadioButton" parent="Widget.AppCompat.CompoundButton.RadioButton" tools:override="true">
<item name="enforceMaterialTheme">true</item>
<item name="useMaterialThemeColors">true</item>
</style>
<style name="ThemeOverlay" />
<style name="ThemeOverlay.Black">
<item name="colorPrimaryDark">@android:color/black</item>
<item name="android:navigationBarColor">@color/navigationBarColorBlack</item>
<item name="android:colorBackground">@android:color/black</item>
<item name="android:windowBackground">@android:color/black</item>
<item name="tabLayoutTheme">@style/Widget.MaterialComponents.TabLayout</item>
</style>
</resources>

View File

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of LSPosed.
~
~ LSPosed 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.
~
~ LSPosed 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 LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2020 EdXposed Contributors
~ Copyright (C) 2021 LSPosed Contributors
-->
<resources>
<style name="Base.AppTheme.Light" parent="Theme.Material.Light.LightStatusBar">
<item name="android:statusBarColor">?android:colorBackground</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryVariant">?colorPrimary</item>
<item name="colorSecondary">?colorPrimary</item>
<item name="colorSecondaryVariant">?colorPrimary</item>
<item name="colorOnSecondary">@android:color/white</item>
<item name="colorError">@color/material_red_500</item>
<item name="colorNormal">@color/material_green_500</item>
<item name="colorInstall">@color/material_blue_500</item>
<item name="rippleTransparency">@color/rippleTransparency_light</item>
<item name="actionBarStyle">@style/Widget.Material.ActionBar.Surface</item>
<item name="actionBarTheme">@style/ThemeOverlay.ActionBar</item>
<item name="toolbarStyle">@style/Widget.Material.Toolbar</item>
<item name="appBarStyle">@style/Widget.AppBar.Surface.Raisable</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.Light" parent="Base.AppTheme.Light" />
<style name="Base.AppTheme" parent="Theme.Material">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryVariant">?colorPrimary</item>
<item name="colorSecondary">?colorPrimary</item>
<item name="colorSecondaryVariant">?colorPrimary</item>
<item name="colorOnSecondary">@android:color/black</item>
<item name="colorError">@color/material_red_700</item>
<item name="colorNormal">@color/material_green_700</item>
<item name="colorInstall">@color/material_blue_700</item>
<item name="rippleTransparency">@color/rippleTransparency_dark</item>
<item name="actionBarStyle">@style/Widget.Material.ActionBar.Surface</item>
<item name="actionBarTheme">@style/ThemeOverlay.ActionBar</item>
<item name="toolbarStyle">@style/Widget.Material.Toolbar</item>
<item name="appBarStyle">@style/Widget.AppBar.Surface.Raisable</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme" parent="Base.AppTheme" />
<style name="Widget.AppBar" parent="">
<item name="android:background">?toolbarColor</item>
<item name="android:theme">?actionBarTheme</item>
<item name="android:stateListAnimator">@animator/raise_animator</item>
<item name="android:elevation">2dp</item>
</style>
<style name="Widget.Material.Toolbar" parent="Widget.MaterialComponents.Toolbar">
<item name="android:background">?android:colorBackground</item>
</style>
<style name="Widget.AppBar.Surface">
<item name="android:background">?android:colorBackground</item>
<item name="android:stateListAnimator">@animator/alpha_animator</item>
<item name="android:elevation">@dimen/app_bar_elevation</item>
</style>
<style name="Widget.AppBar.Surface.Raisable">
<item name="android:elevation">0dp</item>
<item name="android:stateListAnimator">@animator/raise_animator</item>
</style>
<style name="ThemeOverlay.ActionBar" parent="ThemeOverlay.MaterialComponents.ActionBar">
<item name="elevation">0dp</item>
<item name="titleTextAppearance">
@android:style/TextAppearance.Material.Widget.Toolbar.Title
</item>
<item name="subtitleTextAppearance">
@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle
</item>
</style>
<style name="Widget.App.Button.OutlinedButton.IconOnly" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="iconPadding">0dp</item>
<item name="android:paddingLeft">12dp</item>
<item name="android:paddingRight">12dp</item>
<item name="android:minWidth">48dp</item>
</style>
</resources>

View File

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ This file is part of LSPosed.
~
@ -18,9 +17,15 @@
~ Copyright (C) 2020 EdXposed Contributors
~ Copyright (C) 2021 LSPosed Contributors
-->
<resources>
<style name="ThemeOverlay" />
<style name="ThemeOverlay.Black">
<item name="android:colorPrimaryDark">@android:color/black</item>
<item name="android:colorBackground">@android:color/black</item>
</style>
<style name="ThemeOverlay.colorPrimary">
<item name="colorPrimary">@color/colorPrimary</item>
</style>
@ -1700,4 +1705,4 @@
<style name="ThemeOverlay.material_blue_grey_500.material_blue_grey_500">
<item name="colorAccent">@color/material_blue_grey_500</item>
</style>
</resources>
</resources>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ This file is part of LSPosed.
~
~ LSPosed 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.
~
~ LSPosed 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 LSPosed. If not, see <https://www.gnu.org/licenses/>.
~
~ Copyright (C) 2020 EdXposed Contributors
~ Copyright (C) 2021 LSPosed Contributors
-->
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="PrivateResource,UnusedResources">
<!-- Add android:colorControlNormal -->
<style name="Base.ThemeOverlay.AppCompat.ActionBar" tools:override="true">
<item name="android:colorControlNormal">?android:attr/textColorPrimary</item>
<item name="colorControlNormal">?android:attr/textColorPrimary</item>
<item name="searchViewStyle">@style/Widget.AppCompat.SearchView.ActionBar</item>
</style>
<style name="Base.ThemeOverlay.AppCompat.Dark.ActionBar" tools:override="true">
<item name="android:colorControlNormal">?android:attr/textColorPrimary</item>
<item name="colorControlNormal">?android:attr/textColorPrimary</item>
<item name="searchViewStyle">@style/Widget.AppCompat.SearchView.ActionBar</item>
</style>
<style name="Widget.MaterialComponents.CompoundButton.CheckBox" parent="Widget.AppCompat.CompoundButton.CheckBox" tools:override="true">
<item name="enforceMaterialTheme">true</item>
<item name="useMaterialThemeColors">true</item>
</style>
<style name="Widget.MaterialComponents.CompoundButton.RadioButton" parent="Widget.AppCompat.CompoundButton.RadioButton" tools:override="true">
<item name="enforceMaterialTheme">true</item>
<item name="useMaterialThemeColors">true</item>
</style>
</resources>