Added theme switch

This commit is contained in:
2022-08-07 14:29:07 +08:00
parent 77337d86f3
commit 3357c75c3f
51 changed files with 916 additions and 205 deletions

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="?attr/fold_layout_background" />
</shape>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?attr/app_on_theme"
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z" />
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?attr/app_text_theme"
android:pathData="M12,3c-4.97,0 -9,4.03 -9,9s4.03,9 9,9c0.83,0 1.5,-0.67 1.5,-1.5 0,-0.39 -0.15,-0.74 -0.39,-1.01 -0.23,-0.26 -0.38,-0.61 -0.38,-0.99 0,-0.83 0.67,-1.5 1.5,-1.5L16,16c2.76,0 5,-2.24 5,-5 0,-4.42 -4.03,-8 -9,-8zM6.5,12c-0.83,0 -1.5,-0.67 -1.5,-1.5S5.67,9 6.5,9 8,9.67 8,10.5 7.33,12 6.5,12zM9.5,8C8.67,8 8,7.33 8,6.5S8.67,5 9.5,5s1.5,0.67 1.5,1.5S10.33,8 9.5,8zM14.5,8c-0.83,0 -1.5,-0.67 -1.5,-1.5S13.67,5 14.5,5s1.5,0.67 1.5,1.5S15.33,8 14.5,8zM17.5,12c-0.83,0 -1.5,-0.67 -1.5,-1.5S16.67,9 17.5,9s1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5z" />
</vector>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_check" android:state_selected="true" />
<item android:drawable="@android:color/transparent" android:state_selected="false" />
</selector>

View File

@@ -2,8 +2,8 @@
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="?attr/colorPrimary"
android:centerColor="?attr/colorPrimary"
android:endColor="?attr/app_background"
android:endColor="?attr/app_background_theme"
android:startColor="?attr/colorPrimary"
android:type="linear" />
</shape>

View File

@@ -4,18 +4,18 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/libraries_page"
android:layout_width="match_parent"
android:background="?attr/app_background"
android:layout_height="match_parent"
android:background="?attr/app_background_theme"
tools:context=".ui.about.LibrariesActivity">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:theme="@style/Theme.OxygenToolbox.AppBarOverlay"
app:layout_constraintEnd_toEndOf="parent"
android:theme="@style/Theme.OxygenToolbox.AppBarOverlay">
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
@@ -30,9 +30,8 @@
android:id="@+id/libraries_recycler_view"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/app_bar_layout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
</androidx.recyclerview.widget.RecyclerView>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_bar_layout" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -4,8 +4,7 @@
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="false"
android:background="?attr/app_background"
android:background="?attr/app_background_theme"
tools:openDrawer="start">
<include
@@ -18,6 +17,5 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
android:background="?attr/app_background"/>
android:background="?attr/app_background_theme" />
</androidx.drawerlayout.widget.DrawerLayout>

View File

@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?attr/windowSplashScreenBackground"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="?attr/windowSplashScreenBackground">
<ImageView
android:id="@+id/imageView"
android:layout_width="288dp"
android:layout_height="288dp"
android:contentDescription="LOGO"
android:src="@drawable/ic_launcher"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/ic_launcher"
android:contentDescription="LOGO" />
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -21,6 +21,6 @@
</com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_main" />
<include layout="@layout/app_content_main" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@android:color/transparent"
android:orientation="vertical"
android:gravity="center_vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/bottom_radius_background"
android:gravity="center_vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/basic_tools_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</LinearLayout>

View File

@@ -15,7 +15,7 @@
android:layout_marginRight="10dp"
android:paddingHorizontal="5dp"
android:paddingBottom="2dp"
android:background="@drawable/bottom_radius_background"
android:background="@drawable/background_bottom_radius"
android:gravity="center_vertical">
</com.fatapp.oxygentoolbox.layout.AutoLinefeedLayout>

View File

@@ -25,7 +25,8 @@
android:layout_weight="6"
android:gravity="center_vertical"
android:textColor="?attr/app_text_theme"
android:textSize="18sp" />
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/arrow_icon"

View File

@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/app_background"
android:background="?attr/app_background_theme"
tools:context=".ui.about.AboutFragment">
<androidx.appcompat.widget.AppCompatImageView
@@ -23,6 +23,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/about_icon_text_margin"
android:text="@string/app_full_name"
android:textColor="?attr/app_text_theme"
android:textSize="@dimen/default_text_size"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
@@ -35,6 +36,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/about_text_text_margin"
android:text="@string/nav_header_subtitle"
android:textColor="@color/app_secondary_text"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -45,6 +47,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/about_text_text_margin"
android:textColor="@color/app_secondary_text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/app_desc" />

View File

@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/app_background">
android:background="?attr/app_background_theme">
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/bottom_nav_view_pager"

View File

@@ -4,7 +4,7 @@
android:id="@+id/fragment_home_tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/app_background"
android:background="?attr/app_background_theme"
android:orientation="vertical"
tools:context=".ui.home.HomeFragment">

View File

@@ -4,7 +4,7 @@
android:id="@+id/fragment_home_tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/app_background"
android:background="?attr/app_background_theme"
android:orientation="vertical"
tools:context=".ui.home.tools.ToolsFragment">

View File

@@ -1,38 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/app_background"
android:padding="15dp"
android:background="?attr/app_background_theme"
tools:context=".ui.theme.ThemeFragment">
<LinearLayout
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/theme_recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/setting_dark_mode"
android:textColor="?attr/app_text_theme"
android:textSize="@dimen/default_text_size" />
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/theme_dark_mode_spinner"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:entries="@array/setting_dark_theme_selects_array"
android:spinnerMode="dropdown"
android:theme="@style/ThemeSpinner" />
</LinearLayout>
</LinearLayout>
</ScrollView>
android:layout_height="match_parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -8,6 +8,7 @@
android:layout_marginTop="@dimen/library_item_card_margin_vertical"
android:layout_marginEnd="@dimen/library_item_card_margin_horizontal"
android:layout_marginBottom="@dimen/library_item_card_margin_vertical"
android:background="?attr/app_on_background_theme"
android:clickable="true"
android:focusable="true">
@@ -29,6 +30,8 @@
android:paddingEnd="@dimen/library_item_card_inner_padding"
android:paddingRight="@dimen/library_item_card_inner_padding"
android:textAppearance="?textAppearanceHeadline5"
android:textColor="?attr/app_text_theme"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/library_creator"
app:layout_constraintEnd_toStartOf="@+id/library_version"
app:layout_constraintHorizontal_weight="1"
@@ -47,6 +50,7 @@
android:paddingEnd="@dimen/library_item_card_inner_padding"
android:paddingRight="@dimen/library_item_card_inner_padding"
android:textAppearance="?textAppearanceSubtitle1"
android:textColor="?attr/app_second_text_theme"
app:layout_constraintBottom_toTopOf="@+id/library_description_divider"
app:layout_constraintEnd_toStartOf="@+id/library_version"
app:layout_constraintStart_toStartOf="parent"
@@ -62,6 +66,7 @@
android:paddingTop="@dimen/library_item_card_inner_padding"
android:paddingEnd="@dimen/library_item_card_inner_padding"
android:textAppearance="?textAppearanceBody2"
android:textColor="?attr/app_second_text_theme"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="@id/library_name"
app:layout_constraintEnd_toEndOf="parent"
@@ -73,9 +78,9 @@
android:id="@+id/library_description_divider"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginVertical="@dimen/library_item_card_divider_padding_vertical"
android:layout_marginHorizontal="@dimen/library_item_card_divider_padding_horizontal"
android:background="?attr/app_background"
android:layout_marginVertical="@dimen/library_item_card_divider_padding_vertical"
android:background="?attr/app_divider_theme"
app:layout_constraintBottom_toTopOf="@id/library_description"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -89,6 +94,7 @@
android:layout_marginRight="@dimen/library_item_card_inner_padding"
android:maxLines="20"
android:textAppearance="?textAppearanceBody2"
android:textColor="?attr/app_text_theme"
app:layout_constraintBottom_toTopOf="@id/library_bottom_divider"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -99,9 +105,9 @@
android:id="@+id/library_bottom_divider"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginVertical="@dimen/library_item_card_divider_padding_vertical"
android:layout_marginHorizontal="@dimen/library_item_card_divider_padding_horizontal"
android:background="?attr/app_background"
android:layout_marginVertical="@dimen/library_item_card_divider_padding_vertical"
android:background="?attr/app_divider_theme"
app:layout_constraintBottom_toTopOf="@id/library_license"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -119,6 +125,7 @@
android:paddingRight="@dimen/library_item_card_inner_padding"
android:paddingBottom="@dimen/library_item_card_inner_padding"
android:textAppearance="?textAppearanceBody1"
android:textColor="?attr/app_text_theme"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/theme_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:orientation="vertical">
<LinearLayout
android:id="@+id/primary_color"
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center_vertical"
android:padding="10dp"
android:background="@drawable/background_top_radius"
android:orientation="horizontal">
<TextView
android:id="@+id/color_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/setting_theme"
android:textColor="?attr/app_on_theme"/>
<View
android:id="@+id/check"
android:layout_width="24dp"
android:layout_height="24dp"
android:background="@drawable/selector_themes"/>
</LinearLayout>
<View
android:id="@+id/primary_dark_color"
android:layout_width="match_parent"
android:layout_height="20dp"
android:background="@drawable/background_no_radius" />
<View
android:id="@+id/primary_light_color"
android:layout_width="match_parent"
android:layout_height="20dp"
android:background="@drawable/background_no_radius" />
<View
android:id="@+id/accent_color"
android:layout_width="match_parent"
android:layout_height="20dp"
android:background="@drawable/background_bottom_radius" />
</LinearLayout>

File diff suppressed because one or more lines are too long

View File

@@ -1,24 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="default_app_theme">@color/purple_200</color>
<color name="default_app_on_theme">@color/white</color>
<color name="default_app_text_theme">@color/white</color>
<color name="default_app_background">#FF202020</color>
<color name="default_app_second_theme">@color/teal_700</color>
<color name="default_app_second_on_theme">@color/black</color>
<color name="default_fold_layout_background">#FF303030</color>
<color name="default_tools_arrow">#FF666666</color>
<color name="default_tools_button_background">@color/default_app_background</color>
<color name="default_tools_button_text">#FFFAFAFA</color>
<color name="default_tools_button_ripple">#88CCCCCC</color>
<color name="app_background">#FF202020</color>
<color name="app_on_background">#FF303030</color>
<color name="app_primary_text">#FFEEEEEE</color>
<color name="app_secondary_text">#FF757575</color>
<color name="app_ripple">#88CCCCCC</color>
<color name="app_divider">#FFADADAD</color>
</resources>

View File

@@ -25,23 +25,50 @@
<string name="setting_dark_mode">深色主题</string>
<string name="setting_base_settings">基本设置</string>
<string name="setting_language">语言</string>
<string-array name="setting_language_array">
<item>跟随系统</item>
<item>中文</item>
<item>English</item>
</string-array>
<string name="setting_launch_page">启动页</string>
<string-array name="setting_launch_page_array">
<item>工具</item>
<item>收藏</item>
</string-array>
<string name="setting_ui_mode">主题模式</string>
<string-array name="setting_ui_mode_array">
<item>跟随系统</item>
<item>亮色</item>
<item>深色</item>
</string-array>
<string name="setting_theme">主题</string>
<string-array name="setting_theme_array">
<item></item>
<item></item>
<item></item>
<item>深紫</item>
<item>靛青</item>
<item></item>
<item>亮蓝</item>
<item></item>
<item>青绿</item>
<item>绿</item>
<item>亮绿</item>
<item>酸橙</item>
<item></item>
<item>琥珀</item>
<item></item>
<item>深橙</item>
<item></item>
<item></item>
<item>蓝灰</item>
</string-array>
<string name="setting_open_source">开源许可</string>
<string name="setting_search">查找</string>
<string name="setting_about">关于</string>

View File

@@ -25,23 +25,50 @@
<string name="setting_dark_mode">深色主题</string>
<string name="setting_base_settings">基本设置</string>
<string name="setting_language">语言</string>
<string-array name="setting_language_array">
<item>跟随系统</item>
<item>中文</item>
<item>English</item>
</string-array>
<string name="setting_launch_page">启动页</string>
<string-array name="setting_launch_page_array">
<item>工具</item>
<item>收藏</item>
</string-array>
<string name="setting_ui_mode">主题模式</string>
<string-array name="setting_ui_mode_array">
<item>跟随系统</item>
<item>亮色</item>
<item>深色</item>
</string-array>
<string name="setting_theme">主题</string>
<string-array name="setting_theme_array">
<item></item>
<item></item>
<item></item>
<item>深紫</item>
<item>靛青</item>
<item></item>
<item>亮蓝</item>
<item></item>
<item>青绿</item>
<item>绿</item>
<item>亮绿</item>
<item>酸橙</item>
<item></item>
<item>琥珀</item>
<item></item>
<item>深橙</item>
<item></item>
<item></item>
<item>蓝灰</item>
</string-array>
<string name="setting_open_source">开源许可</string>
<string name="setting_search">查找</string>
<string name="setting_about">关于</string>

View File

@@ -25,23 +25,50 @@
<string name="setting_dark_mode">深色主题</string>
<string name="setting_base_settings">基本设置</string>
<string name="setting_language">语言</string>
<string-array name="setting_language_array">
<item>跟随系统</item>
<item>中文</item>
<item>English</item>
</string-array>
<string name="setting_launch_page">启动页</string>
<string-array name="setting_launch_page_array">
<item>工具</item>
<item>收藏</item>
</string-array>
<string name="setting_ui_mode">主题模式</string>
<string-array name="setting_ui_mode_array">
<item>跟随系统</item>
<item>亮色</item>
<item>深色</item>
</string-array>
<string name="setting_theme">主题</string>
<string-array name="setting_theme_array">
<item></item>
<item></item>
<item></item>
<item>深紫</item>
<item>靛青</item>
<item></item>
<item>亮蓝</item>
<item></item>
<item>青绿</item>
<item>绿</item>
<item>亮绿</item>
<item>酸橙</item>
<item></item>
<item>琥珀</item>
<item></item>
<item>深橙</item>
<item></item>
<item></item>
<item>蓝灰</item>
</string-array>
<string name="setting_open_source">开源许可</string>
<string name="setting_search">查找</string>
<string name="setting_about">关于</string>

View File

@@ -5,13 +5,19 @@
</declare-styleable>
<attr name="app_theme" format="color" />
<attr name="app_variant_theme" format="color" />
<attr name="app_on_theme" format="color" />
<attr name="app_text_theme" format="color" />
<attr name="app_background" format="color" />
<attr name="app_second_theme" format="color" />
<attr name="app_second_variant_theme" format="color" />
<attr name="app_second_on_theme" format="color" />
<attr name="app_background_theme" format="color" />
<attr name="app_on_background_theme" format="color" />
<attr name="app_text_theme" format="color" />
<attr name="app_second_text_theme" format="color" />
<attr name="app_ripple_theme" format="color" />
<attr name="app_divider_theme" format="color" />
<attr name="fold_layout_background" format="color" />
<attr name="tools_arrow" format="color" />
<attr name="tools_button_background" format="color" />

View File

@@ -1,24 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="grey_black">#FF212121</color>
<color name="white">#FFFFFFFF</color>
<color name="default_app_theme">@color/purple_500</color>
<color name="default_app_on_theme">@color/white</color>
<color name="default_app_text_theme">#FF444444</color>
<color name="default_app_background">#FFF5F5F5</color>
<color name="app_background">#FFF5F5F5</color>
<color name="app_on_background">@color/white</color>
<color name="app_primary_text">#FF212121</color>
<color name="app_secondary_text">#FF757575</color>
<color name="app_ripple">#88CCCCCC</color>
<color name="app_divider">#FFDDDDDD</color>
<color name="default_app_second_theme">@color/teal_200</color>
<color name="default_app_second_on_theme">@color/black</color>
<color name="red_primary">#FFF44336</color>
<color name="red_primary_dark">#FFD32F2F</color>
<color name="red_primary_light">#FFFFCDD2</color>
<color name="red_text_icons">@color/white</color>
<color name="red_accent">#FFFF5252</color>
<color name="default_fold_layout_background">@color/white</color>
<color name="default_tools_arrow">#FF666666</color>
<color name="default_tools_button_background">@color/default_app_background</color>
<color name="default_tools_button_text">#FF434343</color>
<color name="default_tools_button_ripple">#88CCCCCC</color>
<color name="pink_primary">#FFE91E63</color>
<color name="pink_primary_dark">#FFC3285B</color>
<color name="pink_primary_light">#FFF8BBD0</color>
<color name="pink_text_icons">@color/white</color>
<color name="pink_accent">#FFFF4081</color>
<color name="purple_primary">#FF9C27B0</color>
<color name="purple_primary_dark">#FF7B1FA2</color>
<color name="purple_primary_light">#FFE1BEE7</color>
<color name="purple_text_icons">@color/white</color>
<color name="purple_accent">#FFE040FB</color>
<color name="deep_purple_primary">#FF673AB7</color>
<color name="deep_purple_primary_dark">#FF512DAB</color>
<color name="deep_purple_primary_light">#FFD1C4E9</color>
<color name="deep_purple_text_icons">@color/white</color>
<color name="deep_purple_accent">#FF7C4DFF</color>
<color name="indigo_primary">#FF3F51B5</color>
<color name="indigo_primary_dark">#FF303F9F</color>
<color name="indigo_primary_light">#FFC5CAE9</color>
<color name="indigo_text_icons">@color/white</color>
<color name="indigo_accent">#FF536DFE</color>
<color name="blue_primary">#FF2196F3</color>
<color name="blue_primary_dark">#FF1976D2</color>
<color name="blue_primary_light">#FFBBDEFB</color>
<color name="blue_text_icons">@color/white</color>
<color name="blue_accent">#FF448AFF</color>
<color name="light_blue_primary">#FF03A9F4</color>
<color name="light_blue_primary_dark">#FF0288D1</color>
<color name="light_blue_primary_light">#FFB3E5FC</color>
<color name="light_blue_text_icons">@color/white</color>
<color name="light_blue_accent">#FF03A9F4</color>
<color name="cyan_primary">#FF00BCD4</color>
<color name="cyan_primary_dark">#FF0097A7</color>
<color name="cyan_primary_light">#FFB2EBF2</color>
<color name="cyan_text_icons">@color/white</color>
<color name="cyan_accent">#FF00BCD4</color>
<color name="teal_primary">#FF009688</color>
<color name="teal_primary_dark">#FF00796B</color>
<color name="teal_primary_light">#FFB2DFDB</color>
<color name="teal_text_icons">@color/white</color>
<color name="teal_accent">#FF009688</color>
<color name="green_primary">#FF4CAF50</color>
<color name="green_primary_dark">#FF388E3C</color>
<color name="green_primary_light">#FFC8E6C9</color>
<color name="green_text_icons">@color/white</color>
<color name="green_accent">#FF4CAF50</color>
<color name="light_green_primary">#FF8BC34A</color>
<color name="light_green_primary_dark">#FF689F38</color>
<color name="light_green_primary_light">#FFDCEDC8</color>
<color name="light_green_text_icons">@color/white</color>
<color name="light_green_accent">#FF8BC34A</color>
<color name="lime_primary">#FFCDDC39</color>
<color name="lime_primary_dark">#FFAFB42B</color>
<color name="lime_primary_light">#FFF0F4C3</color>
<color name="lime_text_icons">@color/white</color>
<color name="lime_accent">#FFCDDC39</color>
<color name="yellow_primary">#FFFFEB3B</color>
<color name="yellow_primary_dark">#FFFBC02D</color>
<color name="yellow_primary_light">#FFFFF9C4</color>
<color name="yellow_text_icons">@color/white</color>
<color name="yellow_accent">#FFFFEB3B</color>
<color name="amber_primary">#FFFFC107</color>
<color name="amber_primary_dark">#FFFFA000</color>
<color name="amber_primary_light">#FFFFECB3</color>
<color name="amber_text_icons">@color/white</color>
<color name="amber_accent">#FFFFC107</color>
<color name="orange_primary">#FFFF9800</color>
<color name="orange_primary_dark">#FFF57C00</color>
<color name="orange_primary_light">#FFFFE0B2</color>
<color name="orange_text_icons">@color/white</color>
<color name="orange_accent">#FFFF9800</color>
<color name="deep_orange_primary">#FFFF5722</color>
<color name="deep_orange_primary_dark">#FFE64A19</color>
<color name="deep_orange_primary_light">#FFFFCCBC</color>
<color name="deep_orange_text_icons">@color/white</color>
<color name="deep_orange_accent">#FFFF5722</color>
<color name="brown_primary">#FF795548</color>
<color name="brown_primary_dark">#FF5D4037</color>
<color name="brown_primary_light">#FFD7CCC8</color>
<color name="brown_text_icons">@color/white</color>
<color name="brown_accent">#FF795548</color>
<color name="grey_primary">#FF9E9E9E</color>
<color name="grey_primary_dark">#FF616161</color>
<color name="grey_primary_light">#FFF5F5F5</color>
<color name="grey_text_icons">@color/white</color>
<color name="grey_accent">#FF9E9E9E</color>
<color name="blue_grey_primary">#FF607D8B</color>
<color name="blue_grey_primary_dark">#FF455A64</color>
<color name="blue_grey_primary_light">#FFCFD8DC</color>
<color name="blue_grey_text_icons">@color/white</color>
<color name="blue_grey_accent">#FF607D8B</color>
</resources>

View File

@@ -35,6 +35,7 @@
</string-array>
<string name="setting_base_settings">Base Settings</string>
<string name="setting_language">Language</string>
<string name="setting_language_key" translatable="false">app_language</string>
<string-array name="setting_language_array">
@@ -43,11 +44,12 @@
<item>English</item>
</string-array>
<string-array name="setting_language_values">
<item>system</item>
<item>zh_CN</item>
<item>en_US</item>
<item>SYSTEM</item>
<item>ZH_CN</item>
<item>EN_US</item>
</string-array>
<string name="setting_language_default_value" translatable="false">system</string>
<string name="setting_language_default_value" translatable="false">SYSTEM</string>
<string name="setting_launch_page">Launch Page</string>
<string name="setting_launch_page_key" translatable="false">app_launch_page</string>
<string-array name="setting_launch_page_array">
@@ -55,10 +57,11 @@
<item>Favourites</item>
</string-array>
<string-array name="setting_launch_page_values">
<item>tools</item>
<item>favourites</item>
<item>TOOLS</item>
<item>FAVOURITES</item>
</string-array>
<string name="setting_launch_page_default_value" translatable="false">tools</string>
<string name="setting_launch_page_default_value" translatable="false">TOOLS</string>
<string name="setting_ui_mode">Theme Mode</string>
<string name="setting_ui_mode_key" translatable="false">app_ui_mode</string>
<string-array name="setting_ui_mode_array">
@@ -67,11 +70,37 @@
<item>Dark</item>
</string-array>
<string-array name="setting_ui_mode_values">
<item>system</item>
<item>light</item>
<item>dark</item>
<item>SYSTEM</item>
<item>LIGHT</item>
<item>DARK</item>
</string-array>
<string name="setting_ui_mode_default_value" translatable="false">system</string>
<string name="setting_ui_mode_default_value" translatable="false">SYSTEM</string>
<string name="setting_theme">Theme</string>
<string name="setting_theme_key" translatable="false">app_theme</string>
<string-array name="setting_theme_array">
<item>Red</item>
<item>Pink</item>
<item>Purple</item>
<item>Deep Purple</item>
<item>Indigo</item>
<item>Blue</item>
<item>Light Blue</item>
<item>Cyan</item>
<item>Teal</item>
<item>Green</item>
<item>Light Green</item>
<item>Lime</item>
<item>Yellow</item>
<item>Amber</item>
<item>Orange</item>
<item>Deep Orange</item>
<item>Brown</item>
<item>Grey</item>
<item>Blue Grey</item>
</string-array>
<string name="setting_theme_default_value" translatable="false">BLUE_GREY</string>
<string name="setting_open_source">Open Source License</string>
<string name="setting_search">Search</string>
<string name="setting_about">About</string>

View File

@@ -11,10 +11,10 @@
<item name="android:layout_marginBottom">5dp</item>
<item name="android:paddingStart">15dp</item>
<item name="android:paddingEnd">15dp</item>
<item name="android:background">@drawable/button_radius_shape</item>
<item name="android:background">@drawable/radius_shape</item>
<item name="android:foreground">@drawable/ripple_foreground</item>
<item name="android:stateListAnimator">@null</item>
<item name="android:textColor">@color/default_tools_button_text</item>
<item name="android:textColor">?attr/tools_button_text</item>
</style>
<style name="ToolsLinearLayout">

View File

@@ -2,35 +2,214 @@
<resources>
<!-- Base application theme. -->
<style name="Theme.OxygenToolbox.Default" parent="Theme.MaterialComponents.DayNight.Bridge">
<item name="app_theme">@color/deep_purple_primary</item>
<item name="app_variant_theme">@color/deep_purple_primary_dark</item>
<item name="app_on_theme">@color/deep_purple_text_icons</item>
<item name="app_second_theme">@color/deep_purple_accent</item>
<item name="app_second_variant_theme">@color/deep_purple_accent</item>
<item name="app_second_on_theme">@color/deep_purple_text_icons</item>
<item name="app_background_theme">@color/app_background</item>
<item name="app_on_background_theme">@color/app_on_background</item>
<item name="app_text_theme">@color/app_primary_text</item>
<item name="app_second_text_theme">@color/app_secondary_text</item>
<item name="app_ripple_theme">@color/app_ripple</item>
<item name="app_divider_theme">@color/app_divider</item>
<!-- Primary brand color. -->
<item name="colorPrimary">@color/default_app_theme</item>
<item name="colorPrimaryVariant">@color/default_app_theme</item>
<item name="colorOnPrimary">@color/default_app_on_theme</item>
<item name="colorPrimary">?attr/app_theme</item>
<item name="colorPrimaryVariant">?attr/app_theme</item>
<item name="colorOnPrimary">?attr/app_on_theme</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/default_app_second_theme</item>
<item name="colorSecondaryVariant">@color/default_app_second_theme</item>
<item name="colorOnSecondary">@color/default_app_second_on_theme</item>
<item name="colorSecondary">?attr/app_second_theme</item>
<item name="colorSecondaryVariant">?attr/app_second_variant_theme</item>
<item name="colorOnSecondary">?attr/app_on_theme</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" >?attr/colorPrimaryVariant</item>
<item name="android:statusBarColor">?attr/app_theme</item>
<!-- Customize your theme here. -->
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:windowDisablePreview">true</item>
<item name="app_theme">@color/default_app_theme</item>
<item name="app_on_theme">@color/default_app_on_theme</item>
<item name="app_text_theme">@color/default_app_text_theme</item>
<item name="app_background">@color/default_app_background</item>
<item name="fold_layout_background">?attr/app_on_background_theme</item>
<item name="tools_arrow">?attr/app_second_text_theme</item>
<item name="tools_button_background">?attr/app_background_theme</item>
<item name="tools_button_text">?attr/app_text_theme</item>
<item name="tools_button_ripple">?attr/app_ripple_theme</item>
</style>
<item name="app_second_theme">@color/default_app_second_theme</item>
<item name="app_second_on_theme">@color/default_app_second_on_theme</item>
<style name="Theme.OxygenToolbox.Red" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/red_primary</item>
<item name="app_variant_theme">@color/red_primary_dark</item>
<item name="app_on_theme">@color/red_text_icons</item>
<item name="app_second_theme">@color/red_accent</item>
<item name="app_second_variant_theme">@color/red_accent</item>
<item name="app_second_on_theme">@color/red_text_icons</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/red_primary</item>
</style>
<item name="fold_layout_background">@color/default_fold_layout_background</item>
<item name="tools_arrow">@color/default_tools_arrow</item>
<item name="tools_button_background">@color/default_tools_button_background</item>
<item name="tools_button_text">@color/default_tools_button_text</item>
<item name="tools_button_ripple">@color/default_tools_button_ripple</item>
<style name="Theme.OxygenToolbox.Pink" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/pink_primary</item>
<item name="app_variant_theme">@color/pink_primary_dark</item>
<item name="app_on_theme">@color/pink_text_icons</item>
<item name="app_second_theme">@color/pink_accent</item>
<item name="app_second_variant_theme">@color/pink_accent</item>
<item name="app_second_on_theme">@color/pink_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Purple" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/purple_primary</item>
<item name="app_variant_theme">@color/purple_primary_dark</item>
<item name="app_on_theme">@color/purple_text_icons</item>
<item name="app_second_theme">@color/purple_accent</item>
<item name="app_second_variant_theme">@color/purple_accent</item>
<item name="app_second_on_theme">@color/purple_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.DeepPurple" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/deep_purple_primary</item>
<item name="app_variant_theme">@color/deep_purple_primary_dark</item>
<item name="app_on_theme">@color/deep_purple_text_icons</item>
<item name="app_second_theme">@color/deep_purple_accent</item>
<item name="app_second_variant_theme">@color/deep_purple_accent</item>
<item name="app_second_on_theme">@color/deep_purple_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Indigo" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/indigo_primary</item>
<item name="app_variant_theme">@color/indigo_primary_dark</item>
<item name="app_on_theme">@color/indigo_text_icons</item>
<item name="app_second_theme">@color/indigo_accent</item>
<item name="app_second_variant_theme">@color/indigo_accent</item>
<item name="app_second_on_theme">@color/indigo_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Blue" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/blue_primary</item>
<item name="app_variant_theme">@color/blue_primary_dark</item>
<item name="app_on_theme">@color/blue_text_icons</item>
<item name="app_second_theme">@color/blue_accent</item>
<item name="app_second_variant_theme">@color/blue_accent</item>
<item name="app_second_on_theme">@color/blue_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.LightBlue" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/light_blue_primary</item>
<item name="app_variant_theme">@color/light_blue_primary_dark</item>
<item name="app_on_theme">@color/light_blue_text_icons</item>
<item name="app_second_theme">@color/light_blue_accent</item>
<item name="app_second_variant_theme">@color/light_blue_accent</item>
<item name="app_second_on_theme">@color/light_blue_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Cyan" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/cyan_primary</item>
<item name="app_variant_theme">@color/cyan_primary_dark</item>
<item name="app_on_theme">@color/cyan_text_icons</item>
<item name="app_second_theme">@color/cyan_accent</item>
<item name="app_second_variant_theme">@color/cyan_accent</item>
<item name="app_second_on_theme">@color/cyan_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Teal" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/teal_primary</item>
<item name="app_variant_theme">@color/teal_primary_dark</item>
<item name="app_on_theme">@color/teal_text_icons</item>
<item name="app_second_theme">@color/teal_accent</item>
<item name="app_second_variant_theme">@color/teal_accent</item>
<item name="app_second_on_theme">@color/teal_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Green" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/green_primary</item>
<item name="app_variant_theme">@color/green_primary_dark</item>
<item name="app_on_theme">@color/green_text_icons</item>
<item name="app_second_theme">@color/green_accent</item>
<item name="app_second_variant_theme">@color/green_accent</item>
<item name="app_second_on_theme">@color/green_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.LightGreen" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/light_green_primary</item>
<item name="app_variant_theme">@color/light_green_primary_dark</item>
<item name="app_on_theme">@color/light_green_text_icons</item>
<item name="app_second_theme">@color/light_green_accent</item>
<item name="app_second_variant_theme">@color/light_green_accent</item>
<item name="app_second_on_theme">@color/light_green_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Lime" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/lime_primary</item>
<item name="app_variant_theme">@color/lime_primary_dark</item>
<item name="app_on_theme">@color/lime_text_icons</item>
<item name="app_second_theme">@color/lime_accent</item>
<item name="app_second_variant_theme">@color/lime_accent</item>
<item name="app_second_on_theme">@color/lime_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Yellow" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/yellow_primary</item>
<item name="app_variant_theme">@color/yellow_primary_dark</item>
<item name="app_on_theme">@color/yellow_text_icons</item>
<item name="app_second_theme">@color/yellow_accent</item>
<item name="app_second_variant_theme">@color/yellow_accent</item>
<item name="app_second_on_theme">@color/yellow_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Amber" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/amber_primary</item>
<item name="app_variant_theme">@color/amber_primary_dark</item>
<item name="app_on_theme">@color/amber_text_icons</item>
<item name="app_second_theme">@color/amber_accent</item>
<item name="app_second_variant_theme">@color/amber_accent</item>
<item name="app_second_on_theme">@color/amber_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Orange" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/orange_primary</item>
<item name="app_variant_theme">@color/orange_primary_dark</item>
<item name="app_on_theme">@color/orange_text_icons</item>
<item name="app_second_theme">@color/orange_accent</item>
<item name="app_second_variant_theme">@color/orange_accent</item>
<item name="app_second_on_theme">@color/orange_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.DeepOrange" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/deep_orange_primary</item>
<item name="app_variant_theme">@color/deep_orange_primary_dark</item>
<item name="app_on_theme">@color/deep_orange_text_icons</item>
<item name="app_second_theme">@color/deep_orange_accent</item>
<item name="app_second_variant_theme">@color/deep_orange_accent</item>
<item name="app_second_on_theme">@color/deep_orange_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Brown" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/brown_primary</item>
<item name="app_variant_theme">@color/brown_primary_dark</item>
<item name="app_on_theme">@color/brown_text_icons</item>
<item name="app_second_theme">@color/brown_accent</item>
<item name="app_second_variant_theme">@color/brown_accent</item>
<item name="app_second_on_theme">@color/brown_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Grey" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/grey_primary</item>
<item name="app_variant_theme">@color/grey_primary_dark</item>
<item name="app_on_theme">@color/grey_text_icons</item>
<item name="app_second_theme">@color/grey_accent</item>
<item name="app_second_variant_theme">@color/grey_accent</item>
<item name="app_second_on_theme">@color/grey_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.BlueGrey" parent="Theme.OxygenToolbox.Default">
<item name="app_theme">@color/blue_grey_primary</item>
<item name="app_variant_theme">@color/blue_grey_primary_dark</item>
<item name="app_on_theme">@color/blue_grey_text_icons</item>
<item name="app_second_theme">@color/blue_grey_accent</item>
<item name="app_second_variant_theme">@color/blue_grey_accent</item>
<item name="app_second_on_theme">@color/blue_grey_text_icons</item>
</style>
<style name="Theme.OxygenToolbox.Full" parent="Theme.OxygenToolbox.Default">
@@ -42,10 +221,10 @@
</style>
<style name="Theme.OxygenToolbox.Starting" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/default_app_background</item>
<item name="windowSplashScreenBackground">@color/app_background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher</item>
<item name="windowSplashScreenAnimationDuration">0</item>
<item name="postSplashScreenTheme">@style/Theme.OxygenToolbox.SplashActivity</item>
<item name="postSplashScreenTheme">@style/Theme.OxygenToolbox.Default</item>
</style>
<style name="Theme.OxygenToolbox.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

View File

@@ -21,6 +21,7 @@
app:defaultValue="@string/setting_ui_mode_default_value"
app:entries="@array/setting_ui_mode_array"
app:entryValues="@array/setting_ui_mode_values"
app:icon="@drawable/ic_setting_theme_mode"
app:key="@string/setting_ui_mode_key"
app:title="@string/setting_ui_mode"
app:useSimpleSummaryProvider="true" />