Add floating action button to GameGridActivity.
This commit is contained in:
parent
a4395ecd75
commit
700225f8c8
|
@ -1,9 +1,8 @@
|
|||
<!-- res/drawable/oval_ripple.xml -->
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?android:colorControlHighlight">
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/dolphin_wii"/>
|
||||
<solid android:color="@color/dolphin_gamecube_accent"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
|
@ -0,0 +1,8 @@
|
|||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?android:colorControlHighlight">
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/dolphin_wii_accent"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
|
@ -13,12 +13,31 @@
|
|||
android:minHeight="?android:attr/actionBarSize"
|
||||
android:theme="@android:style/ThemeOverlay.Material.Dark.ActionBar"/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/grid_games"
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/grid_card_game"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin"/>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/grid_games"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/grid_card_game"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_add_directory"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
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:src="@drawable/ic_play"
|
||||
android:stateListAnimator="@anim/button_elevation"
|
||||
android:elevation="4dp"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin"/>
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
|
@ -124,7 +124,7 @@
|
|||
android:layout_alignBottom="@+id/image_game_screen"
|
||||
android:layout_alignEnd="@+id/text_game_title"
|
||||
android:layout_marginBottom="-28dp"
|
||||
android:background="@drawable/oval_ripple"
|
||||
android:background="@drawable/oval_ripple_wii"
|
||||
android:src="@drawable/ic_play"
|
||||
android:stateListAnimator="@anim/button_elevation"
|
||||
android:elevation="4dp"/>
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="dolphin_wii">#5bc0de</color>
|
||||
<color name="dolphin_wii_dark">#428bca</color>
|
||||
<color name="dolphin_wii">#2196f3</color>
|
||||
<color name="dolphin_wii_dark">#1976d2</color>
|
||||
<color name="dolphin_wii_accent">#651fff</color>
|
||||
|
||||
<color name="dolphin_gamecube">#663399</color>
|
||||
<color name="dolphin_gamecube_dark">#311b92</color>
|
||||
<color name="dolphin_gamecube">#673ab7</color>
|
||||
<color name="dolphin_gamecube_dark">#512da8</color>
|
||||
<color name="dolphin_gamecube_accent">#2979ff</color>
|
||||
</resources>
|
|
@ -8,13 +8,13 @@
|
|||
<!-- darker variant for the status bar and contextual app bars -->
|
||||
<item name="android:colorPrimaryDark">@color/dolphin_wii_dark</item>
|
||||
<!-- theme UI controls like checkboxes and text fields -->
|
||||
<item name="android:colorAccent">@color/dolphin_gamecube</item>
|
||||
<item name="android:colorAccent">@color/dolphin_wii_accent</item>
|
||||
</style>
|
||||
|
||||
<style name="DolphinGamecube" parent="android:Theme.Material.Light.NoActionBar">
|
||||
<item name="android:colorPrimary">@color/dolphin_gamecube</item>
|
||||
<item name="android:colorPrimaryDark">@color/dolphin_gamecube_dark</item>
|
||||
<item name="android:colorAccent">@color/dolphin_wii</item>
|
||||
<item name="android:colorAccent">@color/dolphin_gamecube_accent</item>
|
||||
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowActionBar">false</item>
|
||||
|
|
Loading…
Reference in New Issue