Skip to content

Commit

Permalink
Add 3 new themes: brown, gray, blue gray
Browse files Browse the repository at this point in the history
Signed-off-by: enricocid <enrico2588@gmail.com>
  • Loading branch information
enricocid committed May 26, 2018
1 parent bb8a472 commit e312966
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ public class ColorsAdapter extends RecyclerView.Adapter<ColorsAdapter.SimpleView
R.color.green_A400,
R.color.amber_A400,
R.color.orange_A400,
R.color.deep_orange_A400
R.color.deep_orange_A400,
R.color.brown_400,
R.color.gray_400,
R.color.blue_gray_400
};

public ColorsAdapter(@NonNull Activity activity, int accent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,18 @@ private static int resolveTheme(boolean isThemeDark, int accent) {
case R.color.deep_orange_A400:
selectedTheme = isThemeDark ? R.style.AppThemeDeepOrangeInverted : R.style.AppThemeDeepOrange;
break;

case R.color.brown_400:
selectedTheme = isThemeDark ? R.style.AppThemeBrownInverted : R.style.AppThemeBrown;
break;

case R.color.gray_400:
selectedTheme = isThemeDark ? R.style.AppThemeGrayInverted : R.style.AppThemeGray;
break;

case R.color.blue_gray_400:
selectedTheme = isThemeDark ? R.style.AppThemeBlueGrayInverted : R.style.AppThemeBlueGray;
break;
}
return selectedTheme;
}
Expand Down
3 changes: 3 additions & 0 deletions project/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@
<color name="amber_A400">#FFC400</color> <!-- DARK -->
<color name="orange_A400">#FF9100</color> <!-- DARK -->
<color name="deep_orange_A400">#FF3D00</color> <!-- LIGHT -->
<color name="brown_400">#8D6E63</color> <!-- LIGHT -->
<color name="gray_400">#BDBDBD</color> <!-- DARK -->
<color name="blue_gray_400">#78909C</color> <!-- LIGHT -->
</resources>
15 changes: 15 additions & 0 deletions project/app/src/main/res/values/themes_inverted.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,19 @@
<item name="accent_color">@color/deep_orange_A400</item>
<item name="android:seekBarStyle">@style/SeekBarStyle</item>
</style>

<style name="AppThemeBrownInverted" parent="AppThemeInverted">
<item name="accent_color">@color/brown_400</item>
<item name="android:seekBarStyle">@style/SeekBarStyle</item>
</style>

<style name="AppThemeGrayInverted" parent="AppThemeInverted">
<item name="accent_color">@color/gray_400</item>
<item name="android:seekBarStyle">@style/SeekBarStyle</item>
</style>

<style name="AppThemeBlueGrayInverted" parent="AppThemeInverted">
<item name="accent_color">@color/blue_gray_400</item>
<item name="android:seekBarStyle">@style/SeekBarStyle</item>
</style>
</resources>
15 changes: 15 additions & 0 deletions project/app/src/main/res/values/themes_light.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,19 @@
<item name="accent_color">@color/deep_orange_A400</item>
<item name="android:seekBarStyle">@style/SeekBarStyle</item>
</style>

<style name="AppThemeBrown" parent="AppTheme">
<item name="accent_color">@color/brown_400</item>
<item name="android:seekBarStyle">@style/SeekBarStyle</item>
</style>

<style name="AppThemeGray" parent="AppTheme">
<item name="accent_color">@color/gray_400</item>
<item name="android:seekBarStyle">@style/SeekBarStyle</item>
</style>

<style name="AppThemeBlueGray" parent="AppTheme">
<item name="accent_color">@color/blue_gray_400</item>
<item name="android:seekBarStyle">@style/SeekBarStyle</item>
</style>
</resources>

0 comments on commit e312966

Please sign in to comment.