Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
Clean and add getter methods for default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
garretyoder committed Sep 3, 2017
1 parent 8a27776 commit 8dc60e0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
11 changes: 5 additions & 6 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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'
}
14 changes: 14 additions & 0 deletions library/src/main/java/org/polaric/colorful/Colorful.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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'
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8dc60e0

Please sign in to comment.