From 8dc60e0a3b943f08de35652b83cf98fb1cfacd84 Mon Sep 17 00:00:00 2001 From: polaric Date: Sun, 3 Sep 2017 11:56:59 -0400 Subject: [PATCH] Clean and add getter methods for default settings --- library/build.gradle | 11 +++++------ .../main/java/org/polaric/colorful/Colorful.java | 14 ++++++++++++++ sample/build.gradle | 10 +++++----- .../org/polaric/colorful/sample/MainActivity.java | 1 + 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/library/build.gradle b/library/build.gradle index 25aa20d..440ebd9 100755 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' android { - compileSdkVersion 24 - buildToolsVersion "24.0.2" + compileSdkVersion 25 + buildToolsVersion "25.0.2" defaultConfig { minSdkVersion 14 - targetSdkVersion 24 + targetSdkVersion 25 versionCode 1 versionName "1.0" @@ -22,7 +22,6 @@ android { } dependencies { - compile 'com.android.support:appcompat-v7:24.2.1' - compile 'com.android.support:recyclerview-v7:24.2.1' - compile 'com.android.support:preference-v14:24.2.1' + compile 'com.android.support:appcompat-v7:25.3.1' + compile 'com.android.support:preference-v14:25.3.1' } diff --git a/library/src/main/java/org/polaric/colorful/Colorful.java b/library/src/main/java/org/polaric/colorful/Colorful.java index 79a7971..b973535 100755 --- a/library/src/main/java/org/polaric/colorful/Colorful.java +++ b/library/src/main/java/org/polaric/colorful/Colorful.java @@ -147,6 +147,20 @@ public Defaults dark(boolean dark) { darkTheme = dark; return this; } + + ////////////////////////////////////////////////////// + + public static ThemeColor getPrimaryColor() { + return primaryColor; + } + + public static ThemeColor getAccentColor() { + return accentColor; + } + + public static boolean isDarkTheme() { + return isDark; + } } public static class Config { diff --git a/sample/build.gradle b/sample/build.gradle index 6519b4e..34de955 100755 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 24 - buildToolsVersion "24.0.2" + compileSdkVersion 25 + buildToolsVersion "25.0.2" defaultConfig { applicationId "org.polaric.colorful" minSdkVersion 14 - targetSdkVersion 24 + targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -22,6 +22,6 @@ android { dependencies { compile project(':library') - compile 'com.android.support:appcompat-v7:24.2.1' - compile 'com.android.support:support-v4:24.2.1' + compile 'com.android.support:appcompat-v7:25.3.1' + compile 'com.android.support:preference-v14:25.3.1' } diff --git a/sample/src/main/java/org/polaric/colorful/sample/MainActivity.java b/sample/src/main/java/org/polaric/colorful/sample/MainActivity.java index 684f043..da1dffe 100755 --- a/sample/src/main/java/org/polaric/colorful/sample/MainActivity.java +++ b/sample/src/main/java/org/polaric/colorful/sample/MainActivity.java @@ -3,6 +3,7 @@ import android.os.Bundle; import android.support.v7.widget.Toolbar; +import org.polaric.colorful.Colorful; import org.polaric.colorful.ColorfulActivity; public class MainActivity extends ColorfulActivity {