├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── drawable
│ │ │ │ ├── ic_empty.png
│ │ │ │ ├── ic_error.png
│ │ │ │ ├── leaf_pic.png
│ │ │ │ ├── ic_scrollbar.png
│ │ │ │ ├── ic_empty_white.png
│ │ │ │ ├── ic_empty_amoled.png
│ │ │ │ └── ic_gif_white_18dp.png
│ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── values
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── dimesions.xml
│ │ │ │ ├── styles.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── strings.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ └── layout
│ │ │ │ ├── spinner_item_light.xml
│ │ │ │ ├── spinner_item_dark.xml
│ │ │ │ ├── toolbar.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── color_piker_accent.xml
│ │ │ │ ├── activity_setting.xml
│ │ │ │ └── color_piker_primary.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── cn
│ │ │ └── studyou
│ │ │ └── themedeep
│ │ │ ├── utils
│ │ │ ├── PreferenceUtils.java
│ │ │ ├── ThemeUtils.java
│ │ │ └── ColorPaletteUtils.java
│ │ │ ├── ui
│ │ │ ├── MainActivity.java
│ │ │ └── SettingActivity.java
│ │ │ └── base
│ │ │ └── ThemeActivity.java
│ ├── test
│ │ └── java
│ │ │ └── cn
│ │ │ └── studyou
│ │ │ └── themedeep
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── cn
│ │ └── studyou
│ │ └── themedeep
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── README.md
├── converted_file_44df3f12.gif
├── .idea
├── copyright
│ └── profiles_settings.xml
├── dictionaries
│ └── wangjie.xml
├── markdown-navigator
│ └── profiles_settings.xml
├── encodings.xml
├── modules.xml
├── runConfigurations.xml
├── gradle.xml
├── compiler.xml
└── misc.xml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── gradle.properties
├── gradlew.bat
└── gradlew
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ThemeDeep
2 | android 深入之自动主题切换效果图如下:
3 |
4 | 
5 |
--------------------------------------------------------------------------------
/converted_file_44df3f12.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/converted_file_44df3f12.gif
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/.idea/dictionaries/wangjie.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/app/src/main/res/drawable/ic_empty.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/app/src/main/res/drawable/ic_error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/leaf_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/app/src/main/res/drawable/leaf_pic.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_scrollbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/app/src/main/res/drawable/ic_scrollbar.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_empty_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/app/src/main/res/drawable/ic_empty_white.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/.idea/markdown-navigator/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_empty_amoled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/app/src/main/res/drawable/ic_empty_amoled.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_gif_white_18dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/app/src/main/res/drawable/ic_gif_white_18dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wjie2014/ThemeDeep/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/spinner_item_light.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/spinner_item_dark.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/test/java/cn/studyou/themedeep/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package cn.studyou.themedeep;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
18 |
19 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/wangjie/wangjie/android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/cn/studyou/themedeep/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package cn.studyou.themedeep;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("cn.studyou.themedeep", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimesions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 50dp
4 |
5 |
6 | 24dp
7 | 20dp
8 | 36dp
9 |
10 |
11 | 24dp
12 | 20dp
13 | 16dp
14 | 10dp
15 | 8dp
16 | 5dp
17 |
18 |
19 | 44dp
20 |
21 |
22 | 25sp
23 | 20sp
24 | 18sp
25 | 16sp
26 | 14sp
27 | 10sp
28 | 8sp
29 |
30 |
31 | 4dip
32 | 1dp
33 | 5dp
34 | 10dp
35 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion "25.0.2"
6 | defaultConfig {
7 | applicationId "cn.studyou.themedeep"
8 | minSdkVersion 19
9 | targetSdkVersion 25
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 |
21 | }
22 | repositories {
23 | maven {
24 | url "http://dl.bintray.com/dasar/maven"
25 | }
26 | }
27 |
28 | project.ext.supportLib = "24.1.1"
29 |
30 | dependencies {
31 | compile fileTree(dir: 'libs', include: ['*.jar'])
32 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
33 | exclude group: 'com.android.support', module: 'support-annotations'
34 | })
35 | compile 'com.android.support:appcompat-v7:25.1.0'
36 | testCompile 'junit:junit:4.12'
37 | compile "com.android.support:appcompat-v7:$supportLib"
38 | compile "com.android.support:cardview-v7:$supportLib"
39 | compile "com.android.support:recyclerview-v7:$supportLib"
40 | compile "com.android.support:design:$supportLib"
41 | compile "com.android.support:palette-v7:$supportLib"
42 | compile "com.android.support:customtabs:$supportLib"
43 | compile "com.android.support:support-v4:$supportLib"
44 |
45 | compile 'com.mikepenz:iconics-core:2.8.1@aar'
46 | compile 'com.mikepenz:google-material-typeface:2.2.0.3.original@aar'
47 | compile 'com.mikepenz:community-material-typeface:1.5.54.2@aar'
48 | compile 'com.mikepenz:fontawesome-typeface:4.6.0.1@aar'
49 | compile 'uz.shift:colorpicker:0.5@aar'
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/studyou/themedeep/utils/PreferenceUtils.java:
--------------------------------------------------------------------------------
1 | package cn.studyou.themedeep.utils;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 | import android.preference.PreferenceManager;
6 |
7 | /**
8 | * 基本功能:Preference工具类
9 | * 创建:王杰
10 | * 创建时间:2017/2/27
11 | * 邮箱:w489657152@gmail.com
12 | */
13 |
14 | public class PreferenceUtils {
15 | private static PreferenceUtils instance;
16 | private SharedPreferences SP;
17 |
18 | private PreferenceUtils(Context mContext) {
19 | SP = PreferenceManager.getDefaultSharedPreferences(mContext);
20 | }
21 |
22 | public static PreferenceUtils getInstance(Context context) {
23 | if (instance == null) {
24 | synchronized (PreferenceUtils.class) {
25 | if (instance == null)
26 | instance = new PreferenceUtils(context);
27 | }
28 | }
29 | return instance;
30 | }
31 |
32 | public SharedPreferences.Editor getEditor() {
33 | return SP.edit();
34 | }
35 |
36 | public void putString(String key, String value) {
37 | getEditor().putString(key, value).commit();
38 | }
39 |
40 | public String getString(String key, String defValue) {
41 | return SP.getString(key, defValue);
42 | }
43 |
44 | public void putInt(String key, int value) {
45 | getEditor().putInt(key, value).commit();
46 | }
47 |
48 | public int getInt(String key, int defValue) {
49 | return SP.getInt(key, defValue);
50 | }
51 |
52 | public void putBoolean(String key, boolean value) {
53 | getEditor().putBoolean(key, value).commit();
54 | }
55 |
56 | public boolean getBoolean(String key, boolean defValue) {
57 | return SP.getBoolean(key, defValue);
58 | }
59 |
60 |
61 | public void remove(String key) {
62 | getEditor().remove(key).commit();
63 | }
64 |
65 | public void clearPreferences() {
66 | getEditor().clear().commit();
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/studyou/themedeep/ui/MainActivity.java:
--------------------------------------------------------------------------------
1 | package cn.studyou.themedeep.ui;
2 |
3 | import android.content.Intent;
4 | import android.os.Build;
5 | import android.os.Bundle;
6 | import android.support.v4.content.ContextCompat;
7 | import android.support.v7.widget.Toolbar;
8 | import android.view.View;
9 | import android.widget.Button;
10 | import android.widget.TextView;
11 |
12 | import cn.studyou.themedeep.R;
13 | import cn.studyou.themedeep.base.ThemeActivity;
14 | import cn.studyou.themedeep.utils.ColorPaletteUtils;
15 |
16 | public class MainActivity extends ThemeActivity {
17 |
18 |
19 | private Toolbar toolbar;
20 | private Button goSetting;
21 | private TextView toolbarTitle;
22 |
23 | @Override
24 | public void onCreate(Bundle savedInstanceState) {
25 | super.onCreate(savedInstanceState);
26 | setContentView(R.layout.activity_main);
27 | initView();
28 | }
29 |
30 | private void initView() {
31 | toolbar = (Toolbar) findViewById(R.id.toolbar);
32 | toolbarTitle = (TextView) findViewById(R.id.toolbar_title);
33 | setSupportActionBar(toolbar);
34 | toolbarTitle.setText(R.string.app_name);
35 | goSetting = (Button) findViewById(R.id.go_setting);
36 | goSetting.setOnClickListener(new View.OnClickListener() {
37 | @Override
38 | public void onClick(View v) {
39 | startActivity(new Intent(MainActivity.this,SettingActivity.class));
40 | }
41 | });
42 |
43 | }
44 |
45 | @Override
46 | public void onResume() {
47 | super.onResume();
48 | updateNowTheme();
49 | updateTheme();
50 | }
51 |
52 | private void updateNowTheme(){
53 | toolbar.setPopupTheme(getPopupToolbarStyle());
54 | toolbar.setBackgroundColor(getPrimaryColor());
55 | toolbar.setTitle("");
56 |
57 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
58 | if (isTranslucentStatusBar()) {
59 | getWindow().setStatusBarColor(ColorPaletteUtils.getObscuredColor(getPrimaryColor()));
60 | } else {
61 | getWindow().setStatusBarColor(getPrimaryColor());
62 | }
63 | getWindow().setNavigationBarColor(isNavigationBarColored() ? getPrimaryColor() : ContextCompat.getColor(getApplicationContext(), R.color.md_black_1000));
64 |
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/color_piker_accent.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
18 |
19 |
23 |
24 |
34 |
35 |
41 |
42 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
12 |
13 |
18 |
19 |
25 |
26 |
31 |
32 |
42 |
43 |
49 |
50 |
55 |
56 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/color_piker_primary.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
18 |
19 |
23 |
24 |
34 |
35 |
41 |
42 |
49 |
50 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
14 |
15 |
20 |
21 |
22 |
25 |
26 |
31 |
32 |
33 |
36 |
37 |
40 |
41 |
48 |
49 |
54 |
55 |
64 |
65 |
75 |
76 |
82 |
83 |
84 |
88 |
89 |
96 |
97 |
104 |
105 |
106 |
113 |
114 |
115 |
118 |
119 |
123 |
124 |
125 |
126 |
127 |
131 |
132 |
137 |
138 |
139 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/studyou/themedeep/base/ThemeActivity.java:
--------------------------------------------------------------------------------
1 | package cn.studyou.themedeep.base;
2 |
3 | import android.annotation.TargetApi;
4 | import android.app.ActivityManager;
5 | import android.content.Context;
6 | import android.graphics.drawable.BitmapDrawable;
7 | import android.graphics.drawable.Drawable;
8 | import android.os.Build;
9 | import android.os.Bundle;
10 | import android.support.v4.content.ContextCompat;
11 | import android.support.v7.app.AppCompatActivity;
12 | import android.support.v7.widget.SwitchCompat;
13 | import android.widget.ArrayAdapter;
14 | import android.widget.EditText;
15 | import android.widget.RadioButton;
16 | import android.widget.ScrollView;
17 | import android.widget.SeekBar;
18 |
19 | import com.mikepenz.iconics.IconicsDrawable;
20 | import com.mikepenz.iconics.context.IconicsContextWrapper;
21 | import com.mikepenz.iconics.typeface.IIcon;
22 |
23 | import java.util.ArrayList;
24 |
25 | import cn.studyou.themedeep.R;
26 | import cn.studyou.themedeep.utils.ColorPaletteUtils;
27 | import cn.studyou.themedeep.utils.PreferenceUtils;
28 | import cn.studyou.themedeep.utils.ThemeUtils;
29 |
30 | /**
31 | * 基本功能:主题
32 | * 创建:王杰
33 | * 创建时间:2017/2/27
34 | * 邮箱:w489657152@gmail.com
35 | */
36 |
37 | public class ThemeActivity extends AppCompatActivity {
38 | private ThemeUtils themeUtils;
39 | private PreferenceUtils SP;
40 | private boolean coloredNavBar;
41 | private boolean obscuredStatusBar;
42 | private boolean applyThemeImgAct;
43 |
44 |
45 | @Override
46 | public void onCreate(Bundle savedInstanceState) {
47 | super.onCreate(savedInstanceState);
48 | SP = PreferenceUtils.getInstance(getApplicationContext());
49 | themeUtils = new ThemeUtils(getApplicationContext());
50 | }
51 |
52 | @Override
53 | public void onResume() {
54 | super.onResume();
55 | updateTheme();
56 | }
57 |
58 | public void updateTheme() {
59 | themeUtils.updateTheme();
60 | coloredNavBar = SP.getBoolean(getString(R.string.preference_colored_nav_bar), false);
61 | obscuredStatusBar = SP.getBoolean(getString(R.string.preference_translucent_status_bar), true);
62 | applyThemeImgAct = SP.getBoolean(getString(R.string.preference_apply_theme_pager), true);
63 | }
64 |
65 | @Override
66 | protected void attachBaseContext(Context newBase) {
67 | // NOTE: icons stuff
68 | super.attachBaseContext(IconicsContextWrapper.wrap(newBase));
69 | }
70 |
71 | @TargetApi(Build.VERSION_CODES.LOLLIPOP)
72 | public void setNavBarColor() {
73 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
74 | if (isNavigationBarColored()) getWindow().setNavigationBarColor(getPrimaryColor());
75 | else
76 | getWindow().setNavigationBarColor(ContextCompat.getColor(getApplicationContext(), R.color.md_black_1000));
77 | }
78 | }
79 |
80 | @TargetApi(Build.VERSION_CODES.LOLLIPOP)
81 | protected void setStatusBarColor() {
82 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
83 | if (isTranslucentStatusBar())
84 | getWindow().setStatusBarColor(ColorPaletteUtils.getObscuredColor(getPrimaryColor()));
85 | else
86 | getWindow().setStatusBarColor(getPrimaryColor());
87 | }
88 | }
89 |
90 | protected void setScrollViewColor(ScrollView scr) {
91 | themeUtils.setScrollViewColor(scr);
92 | }
93 |
94 | public void setCursorDrawableColor(EditText editText, int color) {
95 | // TODO: 02/08/16 remove this
96 | ThemeUtils.setCursorDrawableColor(editText, color);
97 | }
98 |
99 |
100 | @TargetApi(Build.VERSION_CODES.LOLLIPOP)
101 | public void setRecentApp(String text) {
102 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
103 | BitmapDrawable drawable = ((BitmapDrawable) getDrawable(R.mipmap.ic_launcher));
104 | setTaskDescription(new ActivityManager.TaskDescription(text, drawable.getBitmap(), getPrimaryColor()));
105 | }
106 | }
107 |
108 |
109 | public boolean isNavigationBarColored() {
110 | return coloredNavBar;
111 | }
112 |
113 | public boolean isTranslucentStatusBar() {
114 | return obscuredStatusBar;
115 | }
116 |
117 | protected boolean isApplyThemeOnImgAct() {
118 | return applyThemeImgAct;
119 | }
120 |
121 | protected boolean isTransparencyZero() {
122 | return 255 - SP.getInt(getString(R.string.preference_transparency), 0) == 255;
123 | }
124 |
125 | public int getTransparency() {
126 | return 255 - SP.getInt(getString(R.string.preference_transparency), 0);
127 | }
128 |
129 | public void setBaseTheme(int baseTheme, boolean permanent) {
130 | themeUtils.setBaseTheme(baseTheme, permanent);
131 | }
132 |
133 | public void themeSeekBar(SeekBar bar) {
134 | themeUtils.themeSeekBar(bar);
135 | }
136 |
137 | public int getPrimaryColor() {
138 | return themeUtils.getPrimaryColor();
139 | }
140 |
141 | public int getAccentColor() {
142 | return themeUtils.getAccentColor();
143 | }
144 |
145 | public int getBaseTheme() {
146 | return themeUtils.getBaseTheme();
147 | }
148 |
149 | protected int getBackgroundColor() {
150 | return themeUtils.getBackgroundColor();
151 | }
152 |
153 | protected Drawable getPlaceHolder() {
154 | return themeUtils.getPlaceHolder();
155 | }
156 |
157 | protected int getInvertedBackgroundColor() {
158 | return themeUtils.getInvertedBackgroundColor();
159 | }
160 |
161 | public int getTextColor() {
162 | return themeUtils.getTextColor();
163 | }
164 |
165 | public int getSubTextColor() {
166 | return themeUtils.getSubTextColor();
167 | }
168 |
169 | public int getCardBackgroundColor() {
170 | return themeUtils.getCardBackgroundColor();
171 | }
172 |
173 | public int getIconColor() {
174 | return themeUtils.getIconColor();
175 | }
176 |
177 | protected int getDrawerBackground() {
178 | return themeUtils.getDrawerBackground();
179 | }
180 |
181 | public int getDialogStyle() {
182 | return themeUtils.getDialogStyle();
183 | }
184 |
185 | protected int getPopupToolbarStyle() {
186 | return themeUtils.getPopupToolbarStyle();
187 | }
188 |
189 | protected ArrayAdapter getSpinnerAdapter(ArrayList items) {
190 | return themeUtils.getSpinnerAdapter(items);
191 | }
192 |
193 | protected int getDefaultThemeToolbarColor3th() {
194 | return themeUtils.getDefaultThemeToolbarColor3th();
195 | }
196 |
197 | protected void updateRadioButtonColor(RadioButton radioButton) {
198 | themeUtils.updateRadioButtonColor(radioButton);
199 | }
200 |
201 | protected void setRadioTextButtonColor(RadioButton radioButton, int color) {
202 | themeUtils.setRadioTextButtonColor(radioButton, color);
203 | }
204 |
205 | public void updateSwitchColor(SwitchCompat sw, int color) {
206 | themeUtils.updateSwitchColor(sw, color);
207 | }
208 |
209 | public IconicsDrawable getToolbarIcon(IIcon icon) {
210 | return themeUtils.getToolbarIcon(icon);
211 | }
212 |
213 |
214 | }
215 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 | Android
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 | 1.8
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/studyou/themedeep/ui/SettingActivity.java:
--------------------------------------------------------------------------------
1 | package cn.studyou.themedeep.ui;
2 |
3 | import android.content.DialogInterface;
4 | import android.os.Build;
5 | import android.support.v4.content.ContextCompat;
6 | import android.support.v7.app.AlertDialog;
7 | import android.support.v7.app.AppCompatActivity;
8 | import android.os.Bundle;
9 | import android.support.v7.widget.CardView;
10 | import android.support.v7.widget.SwitchCompat;
11 | import android.support.v7.widget.Toolbar;
12 | import android.view.View;
13 | import android.widget.Button;
14 | import android.widget.CompoundButton;
15 | import android.widget.ImageView;
16 | import android.widget.LinearLayout;
17 | import android.widget.ScrollView;
18 | import android.widget.TextView;
19 |
20 | import com.mikepenz.google_material_typeface_library.GoogleMaterial;
21 |
22 | import cn.studyou.themedeep.R;
23 | import cn.studyou.themedeep.base.ThemeActivity;
24 | import cn.studyou.themedeep.utils.ColorPaletteUtils;
25 | import cn.studyou.themedeep.utils.PreferenceUtils;
26 | import uz.shift.colorpicker.LineColorPicker;
27 | import uz.shift.colorpicker.OnColorChangedListener;
28 |
29 | public class SettingActivity extends ThemeActivity {
30 |
31 | private SwitchCompat swNavBar;
32 | private LinearLayout swNavBarStatus;
33 |
34 | @Override
35 | public void onCreate(Bundle savedInstanceState) {
36 | super.onCreate(savedInstanceState);
37 | setContentView(R.layout.activity_setting);
38 | initView();
39 | }
40 |
41 | private Toolbar toolbar;
42 | private PreferenceUtils SP;
43 | private Button changeThemeButton;
44 | private TextView toolbarTitle;
45 | private SwitchCompat setTranslucentStatusBar;
46 | private LinearLayout translucentStatusBarStatus;
47 |
48 |
49 | private void initView() {
50 | SP = PreferenceUtils.getInstance(getApplicationContext());
51 | toolbar = (Toolbar) findViewById(R.id.toolbar);
52 | toolbarTitle = (TextView) findViewById(R.id.toolbar_title);
53 | setSupportActionBar(toolbar);
54 | changeThemeButton = (Button) findViewById(R.id.changeTheme);
55 | setTranslucentStatusBar = (SwitchCompat) findViewById(R.id.set_translucent_status_bar);
56 | translucentStatusBarStatus = (LinearLayout) findViewById(R.id.translucent_status_bar_status);
57 | swNavBar = (SwitchCompat) findViewById(R.id.set_colored_navBar);
58 | swNavBarStatus = (LinearLayout) findViewById(R.id.set_colored_navBar_status);
59 | changeThemeButton.setOnClickListener(new View.OnClickListener() {
60 | @Override
61 | public void onClick(View v) {
62 | primaryColorPiker();
63 | }
64 | });
65 |
66 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
67 | translucentStatusBarStatus.setVisibility(View.VISIBLE);
68 | swNavBarStatus.setVisibility(View.VISIBLE);
69 | }
70 | setTranslucentStatusBar.setChecked(SP.getBoolean(getString(R.string.preference_translucent_status_bar), true));
71 | setTranslucentStatusBar.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
72 | @Override
73 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
74 | SP.putBoolean(getString(R.string.preference_translucent_status_bar), isChecked);
75 | updateTheme();
76 | setStatusBarColor();
77 | updateSwitchColor(setTranslucentStatusBar, getAccentColor());
78 | }
79 | });
80 |
81 | toolbarTitle.setText(R.string.setting);
82 | toolbar.setNavigationIcon(getToolbarIcon(GoogleMaterial.Icon.gmd_arrow_back));
83 | toolbar.setNavigationOnClickListener(new View.OnClickListener() {
84 | @Override
85 | public void onClick(View v) {
86 | finish();
87 | }
88 | });
89 |
90 |
91 | swNavBar.setChecked(SP.getBoolean(getString(R.string.preference_colored_nav_bar), false));
92 | swNavBar.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
93 | @Override
94 | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
95 | SP.putBoolean(getString(R.string.preference_colored_nav_bar), isChecked);
96 | updateTheme();
97 | updateSwitchColor(swNavBar, getAccentColor());
98 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
99 | getWindow().setNavigationBarColor(isNavigationBarColored() ? getPrimaryColor() : ContextCompat.getColor(getApplicationContext(), R.color.md_black_1000));
100 | }
101 | }
102 | });
103 | }
104 |
105 |
106 | private void primaryColorPiker() {
107 | final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this, getDialogStyle());
108 |
109 | final View dialogLayout = getLayoutInflater().inflate(R.layout.color_piker_primary, null);
110 | final LineColorPicker colorPicker = (LineColorPicker) dialogLayout.findViewById(R.id.color_picker_primary);
111 | final LineColorPicker colorPicker2 = (LineColorPicker) dialogLayout.findViewById(R.id.color_picker_primary_2);
112 | final TextView dialogTitle = (TextView) dialogLayout.findViewById(R.id.cp_primary_title);
113 | CardView dialogCardView = (CardView) dialogLayout.findViewById(R.id.cp_primary_card);
114 | dialogCardView.setCardBackgroundColor(getCardBackgroundColor());
115 |
116 | colorPicker.setColors(ColorPaletteUtils.getBaseColors(getApplicationContext()));
117 | for (int i : colorPicker.getColors())
118 | for (int i2 : ColorPaletteUtils.getColors(getBaseContext(), i))
119 | if (i2 == getPrimaryColor()) {
120 | colorPicker.setSelectedColor(i);
121 | colorPicker2.setColors(ColorPaletteUtils.getColors(getBaseContext(), i));
122 | colorPicker2.setSelectedColor(i2);
123 | break;
124 | }
125 |
126 | dialogTitle.setBackgroundColor(getPrimaryColor());
127 |
128 | colorPicker.setOnColorChangedListener(new OnColorChangedListener() {
129 | @Override
130 | public void onColorChanged(int c) {
131 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
132 | if (isTranslucentStatusBar()) {
133 | getWindow().setStatusBarColor(ColorPaletteUtils.getObscuredColor(getPrimaryColor()));
134 | } else getWindow().setStatusBarColor(c);
135 | }
136 |
137 | toolbar.setBackgroundColor(c);
138 | dialogTitle.setBackgroundColor(c);
139 | colorPicker2.setColors(ColorPaletteUtils.getColors(getApplicationContext(), colorPicker.getColor()));
140 | colorPicker2.setSelectedColor(colorPicker.getColor());
141 | }
142 | });
143 | colorPicker2.setOnColorChangedListener(new OnColorChangedListener() {
144 | @Override
145 | public void onColorChanged(int c) {
146 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
147 | if (isTranslucentStatusBar()) {
148 | getWindow().setStatusBarColor(ColorPaletteUtils.getObscuredColor(c));
149 | } else getWindow().setStatusBarColor(c);
150 | if (isNavigationBarColored())
151 | getWindow().setNavigationBarColor(c);
152 | else
153 | getWindow().setNavigationBarColor(ContextCompat.getColor(getApplicationContext(), R.color.md_black_1000));
154 | }
155 | toolbar.setBackgroundColor(c);
156 | dialogTitle.setBackgroundColor(c);
157 | }
158 | });
159 | dialogBuilder.setView(dialogLayout);
160 |
161 | dialogBuilder.setNeutralButton(getString(R.string.cancel).toUpperCase(), new DialogInterface.OnClickListener() {
162 | @Override
163 | public void onClick(DialogInterface dialog, int which) {
164 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
165 | if (isTranslucentStatusBar()) {
166 | getWindow().setStatusBarColor(ColorPaletteUtils.getObscuredColor(getPrimaryColor()));
167 | } else getWindow().setStatusBarColor(getPrimaryColor());
168 | }
169 | toolbar.setBackgroundColor(getPrimaryColor());
170 | dialog.cancel();
171 | }
172 | });
173 |
174 | dialogBuilder.setPositiveButton(getString(R.string.ok_action).toUpperCase(), new DialogInterface.OnClickListener() {
175 | public void onClick(DialogInterface dialog, int which) {
176 | SP.putInt(getString(R.string.preference_primary_color), colorPicker2.getColor());
177 | updateTheme();
178 | setNavBarColor();
179 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
180 | if (isTranslucentStatusBar()) {
181 | getWindow().setStatusBarColor(ColorPaletteUtils.getObscuredColor(getPrimaryColor()));
182 | } else {
183 | getWindow().setStatusBarColor(getPrimaryColor());
184 | }
185 | }
186 | }
187 | });
188 |
189 | dialogBuilder.setOnDismissListener(new DialogInterface.OnDismissListener() {
190 | @Override
191 | public void onDismiss(DialogInterface dialog) {
192 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
193 | if (isTranslucentStatusBar()) {
194 | getWindow().setStatusBarColor(ColorPaletteUtils.getObscuredColor(getPrimaryColor()));
195 | } else getWindow().setStatusBarColor(getPrimaryColor());
196 | if (isNavigationBarColored())
197 | getWindow().setNavigationBarColor(getPrimaryColor());
198 | else
199 | getWindow().setNavigationBarColor(ContextCompat.getColor(getApplicationContext(), R.color.md_black_1000));
200 | }
201 | toolbar.setBackgroundColor(getPrimaryColor());
202 |
203 | }
204 | });
205 | dialogBuilder.show();
206 | }
207 |
208 | @Override
209 | public void onResume() {
210 | super.onResume();
211 | updateNowTheme();
212 | }
213 |
214 | private void updateNowTheme() {
215 | toolbar.setPopupTheme(getPopupToolbarStyle());
216 | toolbar.setBackgroundColor(getPrimaryColor());
217 | toolbar.setTitle("");
218 |
219 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
220 | if (isTranslucentStatusBar()) {
221 | getWindow().setStatusBarColor(ColorPaletteUtils.getObscuredColor(getPrimaryColor()));
222 | } else {
223 | getWindow().setStatusBarColor(getPrimaryColor());
224 | }
225 | getWindow().setNavigationBarColor(isNavigationBarColored() ? getPrimaryColor() : ContextCompat.getColor(getApplicationContext(), R.color.md_black_1000));
226 | }
227 | }
228 | }
229 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/studyou/themedeep/utils/ThemeUtils.java:
--------------------------------------------------------------------------------
1 | package cn.studyou.themedeep.utils;
2 |
3 | import android.content.Context;
4 | import android.content.res.ColorStateList;
5 | import android.graphics.Color;
6 | import android.graphics.PorterDuff;
7 | import android.graphics.PorterDuffColorFilter;
8 | import android.graphics.drawable.ColorDrawable;
9 | import android.graphics.drawable.Drawable;
10 | import android.os.Build;
11 | import android.support.annotation.ColorRes;
12 | import android.support.v4.content.ContextCompat;
13 | import android.support.v7.widget.SwitchCompat;
14 | import android.view.View;
15 | import android.widget.ArrayAdapter;
16 | import android.widget.EditText;
17 | import android.widget.RadioButton;
18 | import android.widget.ScrollView;
19 | import android.widget.SeekBar;
20 | import android.widget.TextView;
21 |
22 | import com.mikepenz.iconics.IconicsDrawable;
23 | import com.mikepenz.iconics.typeface.IIcon;
24 |
25 | import java.lang.reflect.Field;
26 | import java.lang.reflect.Method;
27 | import java.util.ArrayList;
28 |
29 | import cn.studyou.themedeep.R;
30 |
31 |
32 | /**
33 | * 基本功能:主题设置工具类
34 | * 创建:王杰
35 | * 创建时间:2017/2/27
36 | * 邮箱:w489657152@gmail.com
37 | */
38 |
39 | public class ThemeUtils {
40 | public static final int DARK_THEME = 2;
41 | public static final int LIGHT_THEME = 1;
42 | public static final int AMOLED_THEME = 3;
43 |
44 | private PreferenceUtils SP;
45 | private Context context;
46 |
47 | private int baseTheme;
48 | private int primaryColor;
49 | private int accentColor;
50 |
51 | public ThemeUtils(Context context) {
52 | this.SP = PreferenceUtils.getInstance(context);
53 | this.context = context;
54 | updateTheme();
55 | }
56 |
57 | public void updateTheme(){
58 | this.primaryColor = SP.getInt(context.getString(R.string.preference_primary_color),
59 | getColor(R.color.md_indigo_500));
60 | this.accentColor = SP.getInt(context.getString(R.string.preference_accent_color),
61 | getColor(R.color.md_light_blue_500));
62 | baseTheme = SP.getInt(context.getString(R.string.preference_base_theme), LIGHT_THEME);
63 | }
64 |
65 | public int getPrimaryColor() {
66 | return primaryColor;
67 | }
68 |
69 | public int getAccentColor() {
70 | return accentColor;
71 | }
72 |
73 | public int getBaseTheme(){ return baseTheme; }
74 |
75 | public static int getPrimaryColor(Context context) {
76 | PreferenceUtils SP = PreferenceUtils.getInstance(context);
77 | return SP.getInt(context.getString(R.string.preference_primary_color),
78 | ContextCompat.getColor(context, R.color.md_indigo_500));
79 | }
80 |
81 | public void setBaseTheme(int baseTheme, boolean permanent) {
82 | if(permanent) {
83 | // TODO: 09/08/16 to
84 | } else this.baseTheme = baseTheme;
85 | }
86 |
87 |
88 | public static int getAccentColor(Context context) {
89 | PreferenceUtils SP = PreferenceUtils.getInstance(context);
90 | return SP.getInt(context.getString(R.string.preference_accent_color),
91 | getColor(context, R.color.md_light_blue_500));
92 | }
93 |
94 | public static int getBaseTheme(Context context) {
95 | PreferenceUtils SP = PreferenceUtils.getInstance(context);
96 | return SP.getInt(context.getString(R.string.preference_base_theme), LIGHT_THEME);
97 | }
98 |
99 | public int getColor(@ColorRes int color) {
100 | return ContextCompat.getColor(context, color);
101 | }
102 |
103 | public static int getColor(Context context, @ColorRes int color) {
104 | return ContextCompat.getColor(context, color);
105 | }
106 |
107 | public void themeSeekBar(SeekBar bar) {
108 | bar.getProgressDrawable().setColorFilter(new PorterDuffColorFilter(getAccentColor(), PorterDuff.Mode.SRC_IN));
109 | bar.getThumb().setColorFilter(new PorterDuffColorFilter(getAccentColor(),PorterDuff.Mode.SRC_IN));
110 | }
111 |
112 | public int getBackgroundColor(){
113 | int color;
114 | switch (baseTheme){
115 | case DARK_THEME:color = getColor(R.color.md_dark_background);break;
116 | case AMOLED_THEME:color = getColor(R.color.md_black_1000);break;
117 | case LIGHT_THEME:
118 | default:color = getColor(R.color.md_light_background);
119 | }
120 | return color;
121 | }
122 |
123 | public int getInvertedBackgroundColor(){
124 | int color;
125 | switch (baseTheme){
126 | case DARK_THEME:color = getColor(R.color.md_light_background);break;
127 | case AMOLED_THEME:color = getColor(R.color.md_light_background);break;
128 | case LIGHT_THEME:
129 | default:color = getColor(R.color.md_black_1000);
130 | }
131 | return color;
132 | }
133 |
134 | public int getTextColor(){
135 | int color;
136 | switch (baseTheme){
137 | case DARK_THEME:color = getColor(R.color.md_grey_200);break;
138 | case AMOLED_THEME:color = getColor(R.color.md_grey_200);break;
139 | case LIGHT_THEME:
140 | default:color = getColor(R.color.md_grey_800);
141 | }
142 | return color;
143 | }
144 |
145 | public int getSubTextColor(){
146 | int color;
147 | switch (baseTheme){
148 | case DARK_THEME:color = getColor(R.color.md_grey_400);break;
149 | case AMOLED_THEME:color = getColor(R.color.md_grey_400);break;
150 | case LIGHT_THEME:
151 | default:color = getColor(R.color.md_grey_600);
152 | }
153 | return color;
154 | }
155 |
156 | public int getCardBackgroundColor(){
157 | int color;
158 | switch (baseTheme){
159 | case DARK_THEME:color = getColor(R.color.md_dark_cards);break;
160 | case AMOLED_THEME:color = getColor(R.color.md_black_1000);break;
161 | case LIGHT_THEME:default:color = getColor(R.color.md_light_cards);
162 | }
163 | return color;
164 | }
165 |
166 | public int getIconColor(){
167 | int color;
168 | switch (baseTheme){
169 | case DARK_THEME: case AMOLED_THEME: color = getColor(R.color.md_white_1000);break;
170 | case LIGHT_THEME: default: color = getColor(R.color.md_light_primary_icon);
171 | }
172 | return color;
173 | }
174 |
175 | public IconicsDrawable getToolbarIcon(IIcon icon) {
176 | return new IconicsDrawable(context).icon(icon).color(Color.WHITE).sizeDp(18);
177 | }
178 |
179 | public IconicsDrawable getIcon(IIcon icon) {
180 | return new IconicsDrawable(context).icon(icon).color(getIconColor());
181 | }
182 |
183 | public static IconicsDrawable getIcon(Context context, IIcon icon) {
184 | return new IconicsDrawable(context).icon(icon).color(Color.WHITE);
185 | }
186 |
187 |
188 | public int getDrawerBackground(){
189 | int color;
190 | switch (baseTheme){
191 | case DARK_THEME:color = getColor(R.color.md_dark_cards);break;
192 | case AMOLED_THEME:color = getColor(R.color.md_black_1000);break;
193 | case LIGHT_THEME:
194 | default: color = getColor(R.color.md_light_cards);
195 | }
196 | return color;
197 | }
198 |
199 | public Drawable getPlaceHolder(){
200 | switch (baseTheme){
201 | case DARK_THEME : return ContextCompat.getDrawable(context, R.drawable.ic_empty);
202 | case AMOLED_THEME : return ContextCompat.getDrawable(context, R.drawable.ic_empty_amoled);
203 | case LIGHT_THEME: return ContextCompat.getDrawable(context, R.drawable.ic_empty_white);
204 | }
205 | return null;
206 | }
207 |
208 | public static Drawable getPlaceHolder(Context context){
209 | switch (getBaseTheme(context)){
210 | case DARK_THEME : return ContextCompat.getDrawable(context, R.drawable.ic_empty);
211 | case AMOLED_THEME : return ContextCompat.getDrawable(context, R.drawable.ic_empty_amoled);
212 | case LIGHT_THEME: return ContextCompat.getDrawable(context, R.drawable.ic_empty_white);
213 | }
214 | return null;
215 | }
216 |
217 | public int getDialogStyle(){
218 | int style;
219 | switch (getBaseTheme()){
220 | case DARK_THEME: style = R.style.AlertDialog_Dark;break;
221 | case AMOLED_THEME: style = R.style.AlertDialog_Dark_Amoled;break;
222 | case LIGHT_THEME: default: style = R.style.AlertDialog_Light;break;
223 | }
224 | return style;
225 | }
226 |
227 | public int getPopupToolbarStyle(){
228 | int style;
229 | switch (getBaseTheme()){
230 | case DARK_THEME: style = R.style.DarkActionBarMenu;break;
231 | case AMOLED_THEME: style = R.style.AmoledDarkActionBarMenu;break;
232 | case LIGHT_THEME: default: style = R.style.LightActionBarMenu;
233 | }
234 | return style;
235 | }
236 |
237 | public ArrayAdapter getSpinnerAdapter(ArrayList items) {
238 | switch (getBaseTheme()){
239 | case AMOLED_THEME:
240 | case DARK_THEME: return new ArrayAdapter(context, R.layout.spinner_item_light, items);
241 | case LIGHT_THEME: default: return new ArrayAdapter(context, R.layout.spinner_item_dark, items);
242 | }
243 | }
244 |
245 | public int getDefaultThemeToolbarColor3th(){
246 | int color;
247 | switch (baseTheme){
248 | case DARK_THEME:color = getColor(R.color.md_black_1000); break;
249 | case AMOLED_THEME:color = getColor(R.color.md_blue_grey_800);break;
250 | case LIGHT_THEME: default: color = getColor(R.color.md_blue_grey_800);
251 | }
252 | return color;
253 | }
254 |
255 | private ColorStateList getRadioButtonColor(){
256 | return new ColorStateList(
257 | new int[][]{
258 | new int[]{ -android.R.attr.state_enabled }, //disabled
259 | new int[]{ android.R.attr.state_enabled } //enabled
260 | }, new int[] { getTextColor(), getAccentColor() });
261 | }
262 |
263 | public void updateRadioButtonColor(RadioButton radioButton) {
264 | if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
265 | radioButton.setButtonTintList(getRadioButtonColor());
266 | radioButton.setTextColor(getTextColor());
267 | }
268 | }
269 | public void setRadioTextButtonColor(RadioButton radioButton, int color) {
270 | if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
271 | radioButton.setButtonTintList(getRadioButtonColor());
272 | radioButton.setTextColor(color);
273 | }
274 | }
275 |
276 | public void updateSwitchColor(SwitchCompat sw, int color){
277 | sw.getThumbDrawable().setColorFilter(sw.isChecked() ? color : getSubTextColor(), PorterDuff.Mode.MULTIPLY);
278 | sw.getTrackDrawable().setColorFilter(sw.isChecked() ? ColorPaletteUtils.getTransparentColor(color,100): getBackgroundColor(), PorterDuff.Mode.MULTIPLY);
279 | }
280 |
281 | public void setScrollViewColor(ScrollView scr){
282 | try
283 | {
284 | Field mScrollCacheField = View.class.getDeclaredField("mScrollCache");
285 | mScrollCacheField.setAccessible(true);
286 | Object mScrollCache = mScrollCacheField.get(scr); // scr is your Scroll View
287 |
288 | Field scrollBarField = mScrollCache.getClass().getDeclaredField("scrollBar");
289 | scrollBarField.setAccessible(true);
290 | Object scrollBar = scrollBarField.get(mScrollCache);
291 |
292 | Method method = scrollBar.getClass().getDeclaredMethod("setVerticalThumbDrawable", Drawable.class);
293 | method.setAccessible(true);
294 |
295 | ColorDrawable ColorDraw = new ColorDrawable(getPrimaryColor());
296 | method.invoke(scrollBar, ColorDraw);
297 | } catch(Exception e) {
298 | e.printStackTrace();
299 | }
300 | }
301 |
302 | public void setColorScrollBarDrawable(Drawable drawable) {
303 | drawable.setColorFilter(new PorterDuffColorFilter(getPrimaryColor(), PorterDuff.Mode.SRC_ATOP));
304 | }
305 |
306 | public static void setCursorDrawableColor(EditText editText, int color) {
307 | try {
308 | Field fCursorDrawableRes =
309 | TextView.class.getDeclaredField("mCursorDrawableRes");
310 | fCursorDrawableRes.setAccessible(true);
311 | int mCursorDrawableRes = fCursorDrawableRes.getInt(editText);
312 | Field fEditor = TextView.class.getDeclaredField("mEditor");
313 | fEditor.setAccessible(true);
314 | Object editor = fEditor.get(editText);
315 | Class> clazz = editor.getClass();
316 | Field fCursorDrawable = clazz.getDeclaredField("mCursorDrawable");
317 | fCursorDrawable.setAccessible(true);
318 |
319 | Drawable[] drawables = new Drawable[2];
320 | drawables[0] = ContextCompat.getDrawable(editText.getContext(), mCursorDrawableRes);
321 | drawables[1] = ContextCompat.getDrawable(editText.getContext(), mCursorDrawableRes);
322 | drawables[0].setColorFilter(color, PorterDuff.Mode.SRC_IN);
323 | drawables[1].setColorFilter(color, PorterDuff.Mode.SRC_IN);
324 | fCursorDrawable.set(editor, drawables);
325 | } catch (final Throwable ignored) { }
326 | }
327 | }
328 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #f44336
5 | #e91e63
6 | #9c27b0
7 | #673ab7
8 | #3f51b5
9 | #2196f3
10 | #00bcd4
11 | #009688
12 | #4caf50
13 | #ffeb3b
14 | #ffc107
15 | #ff9800
16 | #795548
17 | #FFFFFF
18 | #9e9e9e
19 | #000000
20 | #00000000
21 |
22 |
23 | #000000
24 |
25 | #8A000000
26 | #DE000000
27 | #8A000000
28 | @color/md_grey_300
29 | @color/md_grey_100
30 | @color/md_grey_200
31 | @color/md_white_1000
32 | @color/md_white_1000
33 | #61000000
34 | #1F000000
35 |
36 | @color/md_grey_900
37 | @color/md_grey_850
38 | @color/md_grey_800
39 | @color/md_grey_800
40 | #4DFFFFFF
41 | #1FFFFFFF
42 | #B3FFFFFF
43 | #FFFFFFFF
44 | #B3FFFFFF
45 | @color/md_black_1000
46 |
47 |
48 | #FFECB3
49 | #FFE082
50 | #FFD54F
51 | #FFCA28
52 | #FFF8E1
53 | #FFC107
54 | #FFB300
55 | #FFA000
56 | #FF8F00
57 | #FF6F00
58 | #FFE57F
59 | #FFD740
60 | #FFC400
61 | #FFAB00
62 |
63 | #BBDEFB
64 | #90CAF9
65 | #64B5F6
66 | #42A5F5
67 | #E3F2FD
68 | #2196F3
69 | #1E88E5
70 | #1976D2
71 | #1565C0
72 | #0D47A1
73 | #82B1FF
74 | #448AFF
75 | #2979FF
76 | #2962FF
77 |
78 | #CFD8DC
79 | #B0BEC5
80 | #90A4AE
81 | #78909C
82 | #ECEFF1
83 | #607D8B
84 | #546E7A
85 | #455A64
86 | #37474F
87 | #263238
88 |
89 | #D7CCC8
90 | #BCAAA4
91 | #A1887F
92 | #8D6E63
93 | #EFEBE9
94 | #795548
95 | #6D4C41
96 | #5D4037
97 | #4E342E
98 | #3E2723
99 |
100 | #B2EBF2
101 | #80DEEA
102 | #4DD0E1
103 | #26C6DA
104 | #E0F7FA
105 | #00BCD4
106 | #00ACC1
107 | #0097A7
108 | #00838F
109 | #006064
110 | #84FFFF
111 | #18FFFF
112 | #00E5FF
113 | #00B8D4
114 |
115 |
116 |
117 | #FFCCBC
118 | #FFAB91
119 | #FF8A65
120 | #FF7043
121 | #FBE9E7
122 | #FF5722
123 | #F4511E
124 | #E64A19
125 | #D84315
126 | #BF360C
127 | #FF9E80
128 | #FF6E40
129 | #FF3D00
130 | #DD2C00
131 |
132 | #D1C4E9
133 | #B39DDB
134 | #9575CD
135 | #7E57C2
136 | #EDE7F6
137 | #673AB7
138 | #5E35B1
139 | #512DA8
140 | #4527A0
141 | #311B92
142 | #B388FF
143 | #7C4DFF
144 | #651FFF
145 | #6200EA
146 |
147 | #C8E6C9
148 | #A5D6A7
149 | #81C784
150 | #66BB6A
151 | #E8F5E9
152 | #4CAF50
153 | #43A047
154 | #388E3C
155 | #2E7D32
156 | #1B5E20
157 | #B9F6CA
158 | #69F0AE
159 | #00E676
160 | #00C853
161 |
162 | #F5F5F5
163 | #EEEEEE
164 | #E0E0E0
165 | #BDBDBD
166 | #FAFAFA
167 | #9E9E9E
168 | #757575
169 | #616161
170 | #424242
171 | #303030
172 | #212121
173 |
174 | #C5CAE9
175 | #9FA8DA
176 | #7986CB
177 | #5C6BC0
178 | #E8EAF6
179 | #3F51B5
180 | #3949AB
181 | #303F9F
182 | #283593
183 | #1A237E
184 | #8C9EFF
185 | #536DFE
186 | #3D5AFE
187 | #304FFE
188 |
189 | #B3E5FC
190 | #81D4FA
191 | #4FC3F7
192 | #29B6F6
193 | #E1F5FE
194 | #03A9F4
195 | #039BE5
196 | #0288D1
197 | #0277BD
198 | #01579B
199 | #80D8FF
200 | #40C4FF
201 | #00B0FF
202 | #0091EA
203 |
204 | #DCEDC8
205 | #C5E1A5
206 | #AED581
207 | #9CCC65
208 | #F1F8E9
209 | #8BC34A
210 | #7CB342
211 | #689F38
212 | #558B2F
213 | #33691E
214 | #CCFF90
215 | #B2FF59
216 | #76FF03
217 | #64DD17
218 |
219 | #F0F4C3
220 | #E6EE9C
221 | #DCE775
222 | #D4E157
223 | #F9FBE7
224 | #CDDC39
225 | #C0CA33
226 | #AFB42B
227 | #9E9D24
228 | #827717
229 | #F4FF81
230 | #EEFF41
231 | #C6FF00
232 | #AEEA00
233 |
234 | #FFE0B2
235 | #FFCC80
236 | #FFB74D
237 | #FFA726
238 | #FFF3E0
239 | #FF9800
240 | #FB8C00
241 | #F57C00
242 | #EF6C00
243 | #E65100
244 | #FFD180
245 | #FFAB40
246 | #FF9100
247 | #FF6D00
248 |
249 | #F8BBD0
250 | #F48FB1
251 | #F06292
252 | #EC407A
253 | #FCE4EC
254 | #E91E63
255 | #D81B60
256 | #C2185B
257 | #AD1457
258 | #880E4F
259 | #FF80AB
260 | #FF4081
261 | #F50057
262 | #C51162
263 |
264 | #E1BEE7
265 | #CE93D8
266 | #BA68C8
267 | #AB47BC
268 | #F3E5F5
269 | #9C27B0
270 | #8E24AA
271 | #7B1FA2
272 | #6A1B9A
273 | #4A148C
274 | #EA80FC
275 | #E040FB
276 | #D500F9
277 | #AA00FF
278 |
279 | #FFCDD2
280 | #EF9A9A
281 | #E57373
282 | #EF5350
283 | #FFEBEE
284 | #F44336
285 | #E53935
286 | #D32F2F
287 | #C62828
288 | #B71C1C
289 | #FF8A80
290 | #FF5252
291 | #FF1744
292 | #D50000
293 |
294 | #B2DFDB
295 | #80CBC4
296 | #4DB6AC
297 | #26A69A
298 | #E0F2F1
299 | #009688
300 | #00897B
301 | #00796B
302 | #00695C
303 | #004D40
304 | #A7FFEB
305 | #64FFDA
306 | #1DE9B6
307 | #00BFA5
308 |
309 | #FFFFFF
310 | #FFF9C4
311 | #FFF59D
312 | #FFF176
313 | #FFEE58
314 | #FFFDE7
315 | #FFEB3B
316 | #FDD835
317 | #FBC02D
318 | #F9A825
319 | #F57F17
320 | #FFFF8D
321 | #FFFF00
322 | #FFEA00
323 | #FFD600
324 |
325 | #c4000000
326 |
327 |
--------------------------------------------------------------------------------
/app/src/main/java/cn/studyou/themedeep/utils/ColorPaletteUtils.java:
--------------------------------------------------------------------------------
1 | package cn.studyou.themedeep.utils;
2 |
3 | import android.content.Context;
4 | import android.graphics.Color;
5 | import android.support.v4.content.ContextCompat;
6 | import android.support.v4.graphics.ColorUtils;
7 |
8 | import cn.studyou.themedeep.R;
9 |
10 | /**
11 | * 基本功能:颜色组工具
12 | * 创建:王杰
13 | * 创建时间:2017/2/27
14 | * 邮箱:w489657152@gmail.com
15 | */
16 |
17 | public class ColorPaletteUtils {
18 |
19 | public static int[] getAccentColors(Context context) {
20 | return new int[]{
21 | ContextCompat.getColor(context, R.color.md_red_500),
22 | ContextCompat.getColor(context, R.color.md_purple_500),
23 | ContextCompat.getColor(context, R.color.md_deep_purple_500),
24 | ContextCompat.getColor(context, R.color.md_blue_500),
25 | ContextCompat.getColor(context, R.color.md_light_blue_500),
26 | ContextCompat.getColor(context, R.color.md_cyan_500),
27 | ContextCompat.getColor(context, R.color.md_teal_500),
28 | ContextCompat.getColor(context, R.color.md_green_500),
29 | ContextCompat.getColor(context, R.color.md_yellow_500),
30 | ContextCompat.getColor(context, R.color.md_orange_500),
31 | ContextCompat.getColor(context, R.color.md_deep_orange_500),
32 | ContextCompat.getColor(context, R.color.md_brown_500),
33 | ContextCompat.getColor(context, R.color.md_blue_grey_500),
34 | };
35 | }
36 |
37 | public static int getObscuredColor(int c) {
38 | float[] hsv = new float[3];
39 | int color = c;
40 | Color.colorToHSV(color, hsv);
41 | hsv[2] *= 0.85f; // value component
42 | color = Color.HSVToColor(hsv);
43 | return color;
44 | }
45 |
46 | public static int getTransparentColor(int color, int alpha) {
47 | return ColorUtils.setAlphaComponent(color, alpha);
48 | }
49 |
50 | public static int[] getTransparencyShadows(int color) {
51 | int[] shadows = new int[10];
52 | for (int i = 0; i < 10; i++)
53 | shadows[i] = (ColorPaletteUtils.getTransparentColor(color, ((100 - (i * 10)) * 255) / 100));
54 | return shadows;
55 | }
56 |
57 | public static int[] getBaseColors(Context context) {
58 | return new int[]{
59 | ContextCompat.getColor(context, R.color.md_red_500),
60 | ContextCompat.getColor(context, R.color.md_pink_500),
61 | ContextCompat.getColor(context, R.color.md_purple_500),
62 | ContextCompat.getColor(context, R.color.md_deep_purple_500),
63 | ContextCompat.getColor(context, R.color.md_indigo_500),
64 | ContextCompat.getColor(context, R.color.md_blue_500),
65 | ContextCompat.getColor(context, R.color.md_light_blue_500),
66 | ContextCompat.getColor(context, R.color.md_cyan_500),
67 | ContextCompat.getColor(context, R.color.md_teal_500),
68 | ContextCompat.getColor(context, R.color.md_green_500),
69 | ContextCompat.getColor(context, R.color.md_light_green_500),
70 | ContextCompat.getColor(context, R.color.md_lime_500),
71 | ContextCompat.getColor(context, R.color.md_yellow_500),
72 | ContextCompat.getColor(context, R.color.md_amber_500),
73 | ContextCompat.getColor(context, R.color.md_orange_500),
74 | ContextCompat.getColor(context, R.color.md_deep_orange_500),
75 | ContextCompat.getColor(context, R.color.md_brown_500),
76 | ContextCompat.getColor(context, R.color.md_blue_grey_500),
77 | ContextCompat.getColor(context, R.color.md_grey_500)
78 | };
79 | }
80 |
81 | public static int[] getColors(Context context, int c) {
82 | if (c == ContextCompat.getColor(context, R.color.md_red_500)) {
83 | return new int[]{
84 | ContextCompat.getColor(context, R.color.md_red_200),
85 | ContextCompat.getColor(context, R.color.md_red_300),
86 | ContextCompat.getColor(context, R.color.md_red_400),
87 | ContextCompat.getColor(context, R.color.md_red_500),
88 | ContextCompat.getColor(context, R.color.md_red_600),
89 | ContextCompat.getColor(context, R.color.md_red_700),
90 | ContextCompat.getColor(context, R.color.md_red_800),
91 | ContextCompat.getColor(context, R.color.md_red_900)
92 | };
93 | } else if (c == ContextCompat.getColor(context, R.color.md_pink_500)) {
94 | return new int[]{
95 | ContextCompat.getColor(context, R.color.md_pink_200),
96 | ContextCompat.getColor(context, R.color.md_pink_300),
97 | ContextCompat.getColor(context, R.color.md_pink_400),
98 | ContextCompat.getColor(context, R.color.md_pink_500),
99 | ContextCompat.getColor(context, R.color.md_pink_600),
100 | ContextCompat.getColor(context, R.color.md_pink_700),
101 | ContextCompat.getColor(context, R.color.md_pink_800),
102 | ContextCompat.getColor(context, R.color.md_pink_900)
103 | };
104 | } else if (c == ContextCompat.getColor(context, R.color.md_purple_500)) {
105 | return new int[]{
106 | ContextCompat.getColor(context, R.color.md_purple_200),
107 | ContextCompat.getColor(context, R.color.md_purple_300),
108 | ContextCompat.getColor(context, R.color.md_purple_400),
109 | ContextCompat.getColor(context, R.color.md_purple_500),
110 | ContextCompat.getColor(context, R.color.md_purple_600),
111 | ContextCompat.getColor(context, R.color.md_purple_700),
112 | ContextCompat.getColor(context, R.color.md_purple_800),
113 | ContextCompat.getColor(context, R.color.md_purple_900)
114 | };
115 | } else if (c == ContextCompat.getColor(context, R.color.md_deep_purple_500)) {
116 | return new int[]{
117 | ContextCompat.getColor(context, R.color.md_deep_purple_200),
118 | ContextCompat.getColor(context, R.color.md_deep_purple_300),
119 | ContextCompat.getColor(context, R.color.md_deep_purple_400),
120 | ContextCompat.getColor(context, R.color.md_deep_purple_500),
121 | ContextCompat.getColor(context, R.color.md_deep_purple_600),
122 | ContextCompat.getColor(context, R.color.md_deep_purple_700),
123 | ContextCompat.getColor(context, R.color.md_deep_purple_800),
124 | ContextCompat.getColor(context, R.color.md_deep_purple_900)
125 | };
126 | } else if (c == ContextCompat.getColor(context, R.color.md_indigo_500)) {
127 | return new int[]{
128 | ContextCompat.getColor(context, R.color.md_indigo_200),
129 | ContextCompat.getColor(context, R.color.md_indigo_300),
130 | ContextCompat.getColor(context, R.color.md_indigo_400),
131 | ContextCompat.getColor(context, R.color.md_indigo_500),
132 | ContextCompat.getColor(context, R.color.md_indigo_600),
133 | ContextCompat.getColor(context, R.color.md_indigo_700),
134 | ContextCompat.getColor(context, R.color.md_indigo_800),
135 | ContextCompat.getColor(context, R.color.md_indigo_900)
136 | };
137 | } else if (c == ContextCompat.getColor(context, R.color.md_blue_500)) {
138 | return new int[]{
139 | ContextCompat.getColor(context, R.color.md_blue_200),
140 | ContextCompat.getColor(context, R.color.md_blue_300),
141 | ContextCompat.getColor(context, R.color.md_blue_400),
142 | ContextCompat.getColor(context, R.color.md_blue_500),
143 | ContextCompat.getColor(context, R.color.md_blue_600),
144 | ContextCompat.getColor(context, R.color.md_blue_700),
145 | ContextCompat.getColor(context, R.color.md_blue_800),
146 | ContextCompat.getColor(context, R.color.md_blue_900)
147 | };
148 | } else if (c == ContextCompat.getColor(context, R.color.md_light_blue_500)) {
149 | return new int[]{
150 | ContextCompat.getColor(context, R.color.md_light_blue_200),
151 | ContextCompat.getColor(context, R.color.md_light_blue_300),
152 | ContextCompat.getColor(context, R.color.md_light_blue_400),
153 | ContextCompat.getColor(context, R.color.md_light_blue_500),
154 | ContextCompat.getColor(context, R.color.md_light_blue_600),
155 | ContextCompat.getColor(context, R.color.md_light_blue_700),
156 | ContextCompat.getColor(context, R.color.md_light_blue_800),
157 | ContextCompat.getColor(context, R.color.md_light_blue_900)
158 | };
159 | } else if (c == ContextCompat.getColor(context, R.color.md_cyan_500)) {
160 | return new int[]{
161 | ContextCompat.getColor(context, R.color.md_cyan_200),
162 | ContextCompat.getColor(context, R.color.md_cyan_300),
163 | ContextCompat.getColor(context, R.color.md_cyan_400),
164 | ContextCompat.getColor(context, R.color.md_cyan_500),
165 | ContextCompat.getColor(context, R.color.md_cyan_600),
166 | ContextCompat.getColor(context, R.color.md_cyan_700),
167 | ContextCompat.getColor(context, R.color.md_cyan_800),
168 | ContextCompat.getColor(context, R.color.md_cyan_900)
169 | };
170 | } else if (c == ContextCompat.getColor(context, R.color.md_teal_500)) {
171 | return new int[]{
172 | ContextCompat.getColor(context, R.color.md_teal_200),
173 | ContextCompat.getColor(context, R.color.md_teal_300),
174 | ContextCompat.getColor(context, R.color.md_teal_400),
175 | ContextCompat.getColor(context, R.color.md_teal_500),
176 | ContextCompat.getColor(context, R.color.md_teal_600),
177 | ContextCompat.getColor(context, R.color.md_teal_700),
178 | ContextCompat.getColor(context, R.color.md_teal_800),
179 | ContextCompat.getColor(context, R.color.md_teal_900)
180 | };
181 | } else if (c == ContextCompat.getColor(context, R.color.md_green_500)) {
182 | return new int[]{
183 | ContextCompat.getColor(context, R.color.md_green_200),
184 | ContextCompat.getColor(context, R.color.md_green_300),
185 | ContextCompat.getColor(context, R.color.md_green_400),
186 | ContextCompat.getColor(context, R.color.md_green_500),
187 | ContextCompat.getColor(context, R.color.md_green_600),
188 | ContextCompat.getColor(context, R.color.md_green_700),
189 | ContextCompat.getColor(context, R.color.md_green_800),
190 | ContextCompat.getColor(context, R.color.md_green_900)
191 | };
192 | } else if (c == ContextCompat.getColor(context, R.color.md_light_green_500)) {
193 | return new int[]{
194 | ContextCompat.getColor(context, R.color.md_light_green_200),
195 | ContextCompat.getColor(context, R.color.md_light_green_300),
196 | ContextCompat.getColor(context, R.color.md_light_green_400),
197 | ContextCompat.getColor(context, R.color.md_light_green_500),
198 | ContextCompat.getColor(context, R.color.md_light_green_600),
199 | ContextCompat.getColor(context, R.color.md_light_green_700),
200 | ContextCompat.getColor(context, R.color.md_light_green_800),
201 | ContextCompat.getColor(context, R.color.md_light_green_900)
202 | };
203 | } else if (c == ContextCompat.getColor(context, R.color.md_lime_500)) {
204 | return new int[]{
205 | ContextCompat.getColor(context, R.color.md_lime_200),
206 | ContextCompat.getColor(context, R.color.md_lime_300),
207 | ContextCompat.getColor(context, R.color.md_lime_400),
208 | ContextCompat.getColor(context, R.color.md_lime_500),
209 | ContextCompat.getColor(context, R.color.md_lime_600),
210 | ContextCompat.getColor(context, R.color.md_lime_700),
211 | ContextCompat.getColor(context, R.color.md_lime_800),
212 | ContextCompat.getColor(context, R.color.md_lime_900)
213 | };
214 | } else if (c == ContextCompat.getColor(context, R.color.md_yellow_500)) {
215 | return new int[]{
216 | ContextCompat.getColor(context, R.color.md_yellow_400),
217 | ContextCompat.getColor(context, R.color.md_yellow_500),
218 | ContextCompat.getColor(context, R.color.md_yellow_600),
219 | ContextCompat.getColor(context, R.color.md_yellow_700),
220 | ContextCompat.getColor(context, R.color.md_yellow_800),
221 | ContextCompat.getColor(context, R.color.md_yellow_900)
222 | };
223 | } else if (c == ContextCompat.getColor(context, R.color.md_amber_500)) {
224 | return new int[]{
225 | ContextCompat.getColor(context, R.color.md_amber_200),
226 | ContextCompat.getColor(context, R.color.md_amber_300),
227 | ContextCompat.getColor(context, R.color.md_amber_400),
228 | ContextCompat.getColor(context, R.color.md_amber_500),
229 | ContextCompat.getColor(context, R.color.md_amber_600),
230 | ContextCompat.getColor(context, R.color.md_amber_700),
231 | ContextCompat.getColor(context, R.color.md_amber_800),
232 | ContextCompat.getColor(context, R.color.md_amber_900)
233 | };
234 | } else if (c == ContextCompat.getColor(context, R.color.md_orange_500)) {
235 | return new int[]{
236 | ContextCompat.getColor(context, R.color.md_orange_200),
237 | ContextCompat.getColor(context, R.color.md_orange_300),
238 | ContextCompat.getColor(context, R.color.md_orange_400),
239 | ContextCompat.getColor(context, R.color.md_orange_500),
240 | ContextCompat.getColor(context, R.color.md_orange_600),
241 | ContextCompat.getColor(context, R.color.md_orange_700),
242 | ContextCompat.getColor(context, R.color.md_orange_800),
243 | ContextCompat.getColor(context, R.color.md_orange_900)
244 | };
245 | } else if (c == ContextCompat.getColor(context, R.color.md_deep_orange_500)) {
246 | return new int[]{
247 | ContextCompat.getColor(context, R.color.md_deep_orange_200),
248 | ContextCompat.getColor(context, R.color.md_deep_orange_300),
249 | ContextCompat.getColor(context, R.color.md_deep_orange_400),
250 | ContextCompat.getColor(context, R.color.md_deep_orange_500),
251 | ContextCompat.getColor(context, R.color.md_deep_orange_600),
252 | ContextCompat.getColor(context, R.color.md_deep_orange_700),
253 | ContextCompat.getColor(context, R.color.md_deep_orange_800),
254 | ContextCompat.getColor(context, R.color.md_deep_orange_900)
255 | };
256 | } else if (c == ContextCompat.getColor(context, R.color.md_brown_500)) {
257 | return new int[]{
258 | ContextCompat.getColor(context, R.color.md_brown_200),
259 | ContextCompat.getColor(context, R.color.md_brown_300),
260 | ContextCompat.getColor(context, R.color.md_brown_400),
261 | ContextCompat.getColor(context, R.color.md_brown_500),
262 | ContextCompat.getColor(context, R.color.md_brown_600),
263 | ContextCompat.getColor(context, R.color.md_brown_700),
264 | ContextCompat.getColor(context, R.color.md_brown_800),
265 | ContextCompat.getColor(context, R.color.md_brown_900)
266 | };
267 | } else if (c == ContextCompat.getColor(context, R.color.md_grey_500)) {
268 | return new int[]{
269 | ContextCompat.getColor(context, R.color.md_grey_400),
270 | ContextCompat.getColor(context, R.color.md_grey_500),
271 | ContextCompat.getColor(context, R.color.md_grey_600),
272 | ContextCompat.getColor(context, R.color.md_grey_700),
273 | ContextCompat.getColor(context, R.color.md_grey_800),
274 | ContextCompat.getColor(context, R.color.md_grey_900),
275 | Color.parseColor("#000000")
276 | };
277 | } else {
278 | return new int[]{
279 | ContextCompat.getColor(context, R.color.md_blue_grey_300),
280 | ContextCompat.getColor(context, R.color.md_blue_grey_400),
281 | ContextCompat.getColor(context, R.color.md_blue_grey_500),
282 | ContextCompat.getColor(context, R.color.md_blue_grey_600),
283 | ContextCompat.getColor(context, R.color.md_blue_grey_700),
284 | ContextCompat.getColor(context, R.color.md_blue_grey_800),
285 | ContextCompat.getColor(context, R.color.md_blue_grey_900)
286 | };
287 | }
288 | }
289 | }
290 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | App主题设置
3 | set_internal_player
4 | set_include_video
5 | swipe_opposite
6 | auto_update_media
7 | alternative_provider
8 | set_delay_full_image
9 | set_picture_orientation
10 | set_max_luminosity
11 | set_translucent_statusbar
12 | nav_bar
13 | basic_theme
14 | primary_color
15 | accent_color
16 | apply_theme_img_act
17 | set_alpha
18 | map_provider
19 |
20 | password_value
21 | active_security
22 | password_on_hidden
23 | password_on_delete
24 | uri_extsdcard_photos
25 | show_fab
26 | use_sub_scaling
27 |
28 |
29 | A colorful material gallery.
30 | HoraApps
31 | Welcome To LeafPic!
32 | A Colorful Material Designed Gallery!
33 | Made with love by
34 |
35 |
36 | Project Manager
37 | Major Designer
38 |
39 |
40 | Sort
41 | Camera
42 | Exclude
43 | Cancel
44 | Delete
45 | Hide
46 | Unhide
47 | OK
48 | Rename photo
49 | Open navigation drawer
50 | Close navigation drawer
51 | Refresh
52 | Send to
53 |
54 | Filter
55 | All
56 | Video
57 | Images
58 | Gifs
59 |
60 | Sort
61 | Name
62 | Date
63 | Date taken
64 |
65 | Size
66 | As number
67 | Ascending
68 |
69 | Select All
70 | Clear Selected
71 |
72 | Share
73 | Rotate
74 | Rotate right 90°
75 | Rotate left 90°
76 | Rotate 180°
77 | Copy to
78 | Move to
79 | Use as
80 | Edit
81 | Fix date
82 | Rename
83 | Rename album
84 | Details
85 | More
86 | Show More
87 | Edit with
88 | Open with
89 | Upload
90 | Set as preview
91 | Clear preview
92 | New Folder
93 | Create new folder
94 |
95 |
96 |
97 | Hiding this album will create a .nomedia file in the folder
98 | and this could make the media inaccessible from other apps. Use the exclude option to avoid this.
99 |
100 | Are you sure you want to delete this album?
101 | Are you sure you want to delete the selected albums?
102 | Are you sure you want to delete this media?
103 | Are you sure you want to delete the selected media?
104 | Are you sure you want to hide the selected albums?
105 | Un-hiding this album you will also make the media available for other apps.
106 | Are you sure you want to exclude the selected
107 | albums? \n If you want to exclude the parent of these albums, try excluding only
108 | one album. A dropdown there will allow you to select the parent of the folder.
109 |
110 | By excluding this folder you will also exclude all sub-folders. Below you can find a list
111 | that allows you to choose a parent, if you have to exclude more folders which are on the same level.
112 |
113 | The new folder will be created in the current path, and
114 | then the media will be copied or moved in the new folder.
115 |
116 |
117 |
118 | Photo
119 | Photos
120 | Video Player
121 | Media
122 | Send to
123 | search
124 | Full resolution
125 | of
126 |
127 |
128 | Affix
129 | Affix Vertical
130 | Set the orientation, horizontal by default.
131 | Save in this album
132 | The result will be saved in this album
133 | Image format
134 | Available formats
135 | Affixing your media, please wait…
136 | Can\'t affix video, you must select at least 2 images.
137 | Quality
138 |
139 |
140 |
141 | Done!
142 | There\'s nothing to show!
143 | Insert something
144 | Nothing changed!
145 | Install shortcut
146 |
147 |
148 | General Setting
149 | Folder
150 | Color Palette
151 | Introduction Skipped!
152 |
153 |
154 | Security
155 | Access by password
156 | Password
157 | Confirm password
158 | Wrong password
159 |
160 | Insert password
161 | Set up a password to protect your media.
162 | Note: password changed, if you forget it you will have to clear application data.
163 |
164 | Use password for
165 |
166 | Fingerprint
167 | Clear Password
168 | The minimum password length is 4 character
169 |
170 |
171 | Settings
172 |
173 | General
174 | Auto update media
175 | You should disable if there are a large number of images.
176 | Translucent Status Bar
177 | Apply a darker primary color to the notification bar.
178 | Excluded Items
179 | Restore the excluded folders.
180 |
181 |
182 | Media Viewer
183 | Media Viewer Theme
184 | Customize Viewer
185 | Apply theme on pictures viewer.
186 |
187 | High Brightness
188 | Maximum brightness when viewing a media.
189 | Force use of accelerometer
190 | Rotate even when auto rotate is locked
191 | Apply Theme
192 | Apply custom color on the picture viewer.
193 | Transparency
194 | Set the grade of transparency
195 | Delay loading of full-size images
196 | Load full image when zoomed in
197 | Swipe Direction
198 | Change the swipe direction of the media viewer.(Default: Left to Right)
199 |
200 | Theme
201 | Primary Color
202 | The main color to be used in the UI.
203 | Accent Color
204 | The secondary color which is used to tint widgets and UI details.
205 | Basic Theme
206 | Select a basic theme.
207 | White
208 | Dark
209 | Dark AMOLED
210 | Colored Navigation Bar
211 | Apply the primary color to the navigation bar.
212 | Internal Video Player
213 | Use the embedded video player
214 |
215 |
216 | Google Play Store
217 | PayPal
218 | Bitcoin
219 |
220 | Hi,\nWe are a small independent team which work with love on LeafPic ❤,
221 | this is our first app, so we have a lot to learn by your feedback.
222 | If you enjoy our work you can show us your appreciation by donating.
223 | \nWith your help we can make this project even better or start new cool ones.
224 |
225 | Consider donating us something to support development.
226 |
227 | Thank you!
228 | Address copied to clipboard
229 | Coming Soon!
230 | Google takes 30% off every donation.
231 | PayPal.Me allows you to send us money in seconds without charges,
232 | if you use a credit card PayPal takes 4% of donations and a standard fee of 0.35€
233 |
234 |
235 | About
236 | Version
237 |
238 | License
239 | Check GPLv3 license terms used on LeafPic.
240 |
241 | Library Licenses
242 | Check third-party libs used on LeafPic.
243 |
244 | Authors
245 |
246 | I\'m 19 years old. I\'m a young software developer, I like CS in general, at most I love
247 | learn doing stuff with Linux and Android. I also like TV Series.
248 |
249 |
250 | I\'m 20 years old. I love music, video games and drawing.
251 | I\'m also really into computer science, programming and design.
252 |
253 | Google+
254 | send via…
255 | SEND EMAIL
256 |
257 | There are no email clients installed.
258 | Special thanks
259 | to Patryk Goworowski for the
260 | awesome icon.
261 |
262 |
263 | to Crowdin community for all the translations
264 |
265 |
266 | to you for using the app
267 |
268 |
269 | Support Development
270 | Translate
271 | Help us to translate LeafPic in more languages.
272 |
273 | Report bug
274 | Report bug or request new features.
275 |
276 | Rate
277 | Leave us a positive rating if you like LeafPic.
278 |
279 | GitHub
280 | Fork the repo and push changes or submit new issues.
281 |
282 |
283 | Path
284 | Type
285 | Resolution
286 | EXIF
287 | Device
288 | Orientation
289 | Location
290 |
291 |
292 | Local Folders
293 | Hidden Folders
294 | Tags
295 | Timeline
296 | Wallpapers
297 | Donate
298 | GitHub
299 |
300 |
301 | Play in background
302 | Video
303 | Audio
304 | Text
305 | Retry
306 | off
307 |
308 |
309 | Protected content is supported on Android 4.3 or later
310 | This device does not support the required DRM scheme
311 | An unknown DRM error occurred
312 | Permission to access storage was denied!\n I\'m not able to get your images!
313 | Unable to query device decoders
314 | Unable to fix date
315 | Compression settings
316 | Include Video
317 | Show FAB
318 | Display the floating button.
319 | Map Provider
320 | Chose the source of maps
321 | Insert something!
322 | password doesn\'t match
323 | Choose the map provider
324 | Use Google static maps
325 | Use OpenStreetMap
326 | SD-Card write permission
327 | In the next screen, please select the root of the SD
328 | card in the left sidebar and confirm at the bottom, to grant the writing permission of
329 | the SD card.
330 |
331 | Obtained permission to write on the SD-Card.
332 | Alternative media provider
333 | If you miss some folders or if you have any issue
334 | with the albums enable this option
335 | Multi column
336 | Chose how many columns you want for your folders and media
337 |
338 | columns
339 | Advanced
340 | Pin to top
341 | Remove from top
342 | new file created
343 | Sub-Scaling Image View
344 |
345 | (TESTING) It allows you to have a better zoom management and a clear image but it isn\'t
346 | really optimized right now
347 |
348 | 去设置
349 | 设置
350 | 状态栏透明:
351 | 设置主题颜色
352 | 设置导航栏颜色:
353 |
354 |
--------------------------------------------------------------------------------