From 0b348a763069050876c56ec566f511a6822ba9c7 Mon Sep 17 00:00:00 2001 From: Smohk Date: Sat, 16 Mar 2019 14:35:29 -0500 Subject: [PATCH 1/2] Add gold color and update Gradle --- .../main/java/com/teamtreehouse/funfacts/ColorWheel.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/teamtreehouse/funfacts/ColorWheel.java b/app/src/main/java/com/teamtreehouse/funfacts/ColorWheel.java index 8a62442..b719d56 100644 --- a/app/src/main/java/com/teamtreehouse/funfacts/ColorWheel.java +++ b/app/src/main/java/com/teamtreehouse/funfacts/ColorWheel.java @@ -19,20 +19,19 @@ public class ColorWheel { "#e0ab18", // mustard "#637a91", // dark gray "#f092b0", // pink - "#b7c0c7" // light gray + "#b7c0c7", // light gray + "#ddca8b" // gold }; // Method (abilities: things the object can do) public int getColor() { - String color = ""; + String color; // Randomly select a fact Random randomGenerator = new Random(); // Construct a new Random number generator int randomNumber = randomGenerator.nextInt(mColors.length); color = mColors[randomNumber]; - int colorAsInt = Color.parseColor(color); - - return colorAsInt; + return Color.parseColor(color); } } From 22f0659446c4ef69967f3db6a7bbd4a2dc213a92 Mon Sep 17 00:00:00 2001 From: Smohk Date: Sat, 16 Mar 2019 14:37:09 -0500 Subject: [PATCH 2/2] Add bronze color --- .idea/gradle.xml | 6 +- .idea/misc.xml | 15 +- .idea/modules.xml | 2 +- FunFacts.iml | 19 --- app/app.iml | 140 +++++++++++++----- app/build.gradle | 9 +- .../teamtreehouse/funfacts/ColorWheel.java | 3 +- build.gradle | 4 +- gradle/wrapper/gradle-wrapper.properties | 4 +- 9 files changed, 119 insertions(+), 83 deletions(-) delete mode 100644 FunFacts.iml diff --git a/.idea/gradle.xml b/.idea/gradle.xml index bd4202c..8c5c716 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -3,7 +3,10 @@ diff --git a/.idea/misc.xml b/.idea/misc.xml index c9710e6..ca04b26 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,19 +1,6 @@ - - - - - - - - - - - - - - + diff --git a/.idea/modules.xml b/.idea/modules.xml index 9b2307c..8ff2b6c 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + diff --git a/FunFacts.iml b/FunFacts.iml deleted file mode 100644 index 5def1bf..0000000 --- a/FunFacts.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/app.iml b/app/app.iml index 1593039..16c9e6c 100644 --- a/app/app.iml +++ b/app/app.iml @@ -1,5 +1,5 @@ - + @@ -9,89 +9,151 @@ - - - + + + - - + + - + - - + + - + + - + + + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 2007557..4421136 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,13 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 23 - buildToolsVersion "23.0.0" + compileSdkVersion 28 defaultConfig { applicationId "com.teamtreehouse.funfacts" minSdkVersion 15 - targetSdkVersion 23 + targetSdkVersion 28 versionCode 1 versionName "1.0" } @@ -20,6 +19,6 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.0.0' + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'com.android.support:appcompat-v7:28.0.0' } diff --git a/app/src/main/java/com/teamtreehouse/funfacts/ColorWheel.java b/app/src/main/java/com/teamtreehouse/funfacts/ColorWheel.java index 8a62442..58a9fd5 100644 --- a/app/src/main/java/com/teamtreehouse/funfacts/ColorWheel.java +++ b/app/src/main/java/com/teamtreehouse/funfacts/ColorWheel.java @@ -19,7 +19,8 @@ public class ColorWheel { "#e0ab18", // mustard "#637a91", // dark gray "#f092b0", // pink - "#b7c0c7" // light gray + "#b7c0c7", // light gray + "#8b4513" // bronze }; // Method (abilities: things the object can do) diff --git a/build.gradle b/build.gradle index 1b7886d..a9f27ab 100644 --- a/build.gradle +++ b/build.gradle @@ -3,9 +3,10 @@ buildscript { repositories { jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:3.3.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -15,5 +16,6 @@ buildscript { allprojects { repositories { jcenter() + google() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e7faee0..e020291 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Apr 10 15:27:10 PDT 2013 +#Sat Mar 16 14:31:04 CDT 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip