From 86feaf3da759c065e162f5be29af097272494712 Mon Sep 17 00:00:00 2001 From: teddywilson Date: Mon, 10 Jul 2017 14:44:51 -0400 Subject: [PATCH] changes --- .../fragments/ViewFragment.java | 1 - .../spurceexampleapp/util/ColorUtils.java | 43 ------------------- app/src/main/res/layout/view_card.xml | 9 ++-- app/src/main/res/layout/view_fragment.xml | 4 +- app/src/main/res/values/colors.xml | 8 ---- 5 files changed, 7 insertions(+), 58 deletions(-) delete mode 100644 app/src/main/java/com/willowtreeapps/spurceexampleapp/util/ColorUtils.java diff --git a/app/src/main/java/com/willowtreeapps/spurceexampleapp/fragments/ViewFragment.java b/app/src/main/java/com/willowtreeapps/spurceexampleapp/fragments/ViewFragment.java index dabd061..a4b2c1f 100644 --- a/app/src/main/java/com/willowtreeapps/spurceexampleapp/fragments/ViewFragment.java +++ b/app/src/main/java/com/willowtreeapps/spurceexampleapp/fragments/ViewFragment.java @@ -35,7 +35,6 @@ import android.widget.GridLayout; import com.willowtreeapps.spurceexampleapp.R; -import com.willowtreeapps.spurceexampleapp.util.ColorUtils; import com.willowtreeapps.spurceexampleapp.widgets.CardLayout; import java.util.ArrayList; diff --git a/app/src/main/java/com/willowtreeapps/spurceexampleapp/util/ColorUtils.java b/app/src/main/java/com/willowtreeapps/spurceexampleapp/util/ColorUtils.java deleted file mode 100644 index d24d4e1..0000000 --- a/app/src/main/java/com/willowtreeapps/spurceexampleapp/util/ColorUtils.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.willowtreeapps.spurceexampleapp.util; - -import android.content.Context; -import android.support.v4.content.ContextCompat; - -import com.willowtreeapps.spurceexampleapp.R; - -import java.util.Random; - -/** - * Created by teddywilson on 7/10/17. - */ - -public class ColorUtils { - - public static final int ICON_COLOR_COUNT = 6; - - public static int randomIconColor(Context context) { - int val = (int) (Math.random() * 5); - switch (val) { - case 0: - return ContextCompat.getColor(context, R.color.icon_color_1); - - case 1: - return ContextCompat.getColor(context, R.color.icon_color_2); - - case 2: - return ContextCompat.getColor(context, R.color.icon_color_3); - - case 3: - return ContextCompat.getColor(context, R.color.icon_color_4); - - case 4: - return ContextCompat.getColor(context, R.color.icon_color_5); - - case 5: - return ContextCompat.getColor(context, R.color.icon_color_6); - - } - throw new RuntimeException("Invalid color value"); - } - -} diff --git a/app/src/main/res/layout/view_card.xml b/app/src/main/res/layout/view_card.xml index 9a1c429..25bbf70 100644 --- a/app/src/main/res/layout/view_card.xml +++ b/app/src/main/res/layout/view_card.xml @@ -2,15 +2,16 @@ @@ -18,7 +19,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@id/fake_paragraph" - android:background="@color/spruceViewColor" + android:background="@color/square_background" /> \ No newline at end of file diff --git a/app/src/main/res/layout/view_fragment.xml b/app/src/main/res/layout/view_fragment.xml index 8757c2c..5bc9a85 100644 --- a/app/src/main/res/layout/view_fragment.xml +++ b/app/src/main/res/layout/view_fragment.xml @@ -43,8 +43,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" - android:columnCount="4" - android:rowCount="6"/> + android:columnCount="6" + android:rowCount="7"/> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index cde8900..6c8f832 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -34,12 +34,4 @@ #D9E1E2 #DBE9F9 - - #abe8dc - #b8dcf2 - #f7c2ba - #f5d1ad - #faeba6 - #b5edcc -