summaryrefslogtreecommitdiff
path: root/Source/Android/app/src
diff options
context:
space:
mode:
authorEder Bastos <bastos.eder@gmail.com>2015-05-17 09:47:56 -0400
committerEder Bastos <bastos.eder@gmail.com>2015-05-20 19:46:48 -0400
commit4f6a5e0293d2522d80ed88966fabb33c32eb886c (patch)
treea7f041331bb495e3b3e7f644fc2e5fe6f052148b /Source/Android/app/src
parent91c1c0b1b378a03ccb562f3fd7af7ad17752b055 (diff)
Android: Make floating action buttons use the correct accent color programmatically.
Diffstat (limited to 'Source/Android/app/src')
-rw-r--r--Source/Android/app/src/main/res/drawable/oval_ripple_accent.xml (renamed from Source/Android/app/src/main/res/drawable/oval_ripple_wii.xml)2
-rw-r--r--Source/Android/app/src/main/res/drawable/oval_ripple_gc.xml8
-rw-r--r--Source/Android/app/src/main/res/layout/activity_game_grid.xml2
-rw-r--r--Source/Android/app/src/main/res/layout/dialog_game_details.xml4
-rw-r--r--Source/Android/app/src/main/res/values/styles.xml25
5 files changed, 29 insertions, 12 deletions
diff --git a/Source/Android/app/src/main/res/drawable/oval_ripple_wii.xml b/Source/Android/app/src/main/res/drawable/oval_ripple_accent.xml
index 644876eda3..fbdfec87f5 100644
--- a/Source/Android/app/src/main/res/drawable/oval_ripple_wii.xml
+++ b/Source/Android/app/src/main/res/drawable/oval_ripple_accent.xml
@@ -2,7 +2,7 @@
android:color="?android:colorControlHighlight">
<item>
<shape android:shape="oval">
- <solid android:color="@color/dolphin_accent_wii"/>
+ <solid android:color="?android:colorAccent"/>
</shape>
</item>
</ripple> \ No newline at end of file
diff --git a/Source/Android/app/src/main/res/drawable/oval_ripple_gc.xml b/Source/Android/app/src/main/res/drawable/oval_ripple_gc.xml
deleted file mode 100644
index 167d3ef13a..0000000000
--- a/Source/Android/app/src/main/res/drawable/oval_ripple_gc.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:color="?android:colorControlHighlight">
- <item>
- <shape android:shape="oval">
- <solid android:color="@color/dolphin_accent_gamecube"/>
- </shape>
- </item>
-</ripple> \ No newline at end of file
diff --git a/Source/Android/app/src/main/res/layout/activity_game_grid.xml b/Source/Android/app/src/main/res/layout/activity_game_grid.xml
index 2dc6416a94..8186490004 100644
--- a/Source/Android/app/src/main/res/layout/activity_game_grid.xml
+++ b/Source/Android/app/src/main/res/layout/activity_game_grid.xml
@@ -33,7 +33,7 @@
android:layout_alignBottom="@+id/image_game_screen"
android:layout_alignEnd="@+id/text_game_title"
android:layout_marginBottom="28dp"
- android:background="@drawable/oval_ripple_gc"
+ android:background="@drawable/oval_ripple_accent"
android:src="@drawable/ic_add"
android:stateListAnimator="@anim/button_elevation"
android:elevation="4dp"
diff --git a/Source/Android/app/src/main/res/layout/dialog_game_details.xml b/Source/Android/app/src/main/res/layout/dialog_game_details.xml
index 940c69cdc1..1d7b63468b 100644
--- a/Source/Android/app/src/main/res/layout/dialog_game_details.xml
+++ b/Source/Android/app/src/main/res/layout/dialog_game_details.xml
@@ -18,7 +18,7 @@
android:layout_marginLeft="16dp"
android:layout_marginTop="24dp"
tools:src="@drawable/placeholder_banner"
- app:border_color="#ffcccccc"
+ app:border_color="?android:colorAccent"
app:border_width="2dp"
/>
@@ -120,7 +120,7 @@
android:layout_alignBottom="@+id/image_game_screen"
android:layout_alignEnd="@+id/text_game_title"
android:layout_marginBottom="-28dp"
- android:background="@drawable/oval_ripple_wii"
+ android:background="@drawable/oval_ripple_accent"
android:src="@drawable/ic_play"
android:stateListAnimator="@anim/button_elevation"
android:elevation="4dp"/>
diff --git a/Source/Android/app/src/main/res/values/styles.xml b/Source/Android/app/src/main/res/values/styles.xml
index efc39de62c..2752458eb2 100644
--- a/Source/Android/app/src/main/res/values/styles.xml
+++ b/Source/Android/app/src/main/res/values/styles.xml
@@ -46,4 +46,29 @@
<!-- theme UI controls like checkboxes and text fields -->
<item name="android:colorAccent">@color/dolphin_accent_wiiware</item>
</style>
+
+ <!-- Themes for Dialogs -->
+ <style name="DolphinDialogBase" parent="android:Theme.Material.Light.Dialog">
+ <!-- Main theme colors -->
+ <!-- your app branding color for the app bar -->
+ <item name="android:colorPrimary">@color/dolphin_blue</item>
+ <!-- darker variant for the status bar and contextual app bars -->
+ <item name="android:colorPrimaryDark">@color/dolphin_blue_dark</item>
+ </style>
+
+ <!-- Inherit from the Base Dolphin Dialog Theme-->
+ <style name="DolphinDialogWii" parent="DolphinDialogBase">
+ <!-- theme UI controls like checkboxes and text fields -->
+ <item name="android:colorAccent">@color/dolphin_accent_wii</item>
+ </style>
+
+ <style name="DolphinDialogGamecube" parent="DolphinDialogBase">
+ <!-- theme UI controls like checkboxes and text fields -->
+ <item name="android:colorAccent">@color/dolphin_accent_gamecube</item>
+ </style>
+
+ <style name="DolphinDialogWiiware" parent="DolphinDialogBase">
+ <!-- theme UI controls like checkboxes and text fields -->
+ <item name="android:colorAccent">@color/dolphin_accent_wiiware</item>
+ </style>
</resources> \ No newline at end of file