Android: Make floating action buttons use the correct accent color programmatically.
This commit is contained in:
parent
91c1c0b1b3
commit
4f6a5e0293
|
@ -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>
|
|
@ -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>
|
|
@ -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"
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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>
|
Loading…
Reference in New Issue