Set FAB tint based on accent

pull/437/head
Alex Baker 8 years ago
parent dff5b8dcb2
commit 33e0dbb53a

@ -46,7 +46,7 @@
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:src="@drawable/ic_add_24dp"
android:tint="@android:color/white"
android:tint="?attr/fab_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"

@ -16,6 +16,7 @@
<attr name="dark_status_bar" format="boolean" />
<attr name="alpha_secondary" format="dimension" />
<attr name="alpha_disabled" format="dimension" />
<attr name="fab_text" format="color" />
<declare-styleable name="TimePreference">
<attr name="summary" format="string" />

@ -50,6 +50,14 @@
<item name="actionBarSecondaryText">@color/black_54</item>
</style>
<style name="WhiteTint">
<item name="fab_text">@color/white_100</item>
</style>
<style name="BlackTint">
<item name="fab_text">@color/black_87</item>
</style>
<style name="WhiteToolbarOverlay" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<!--<item name="android:textColorPrimary">@color/white_100</item>-->
<item name="colorControlNormal">@color/white_100</item>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/amber_700</item>
</style>
<style name="AmberAccent">
<style name="AmberAccent" parent="BlackTint">
<item name="colorAccent">@color/amber_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/blue_700</item>
</style>
<style name="BlueAccent">
<style name="BlueAccent" parent="WhiteTint">
<item name="colorAccent">@color/blue_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/blue_grey_700</item>
</style>
<style name="BlueGreyAccent">
<style name="BlueGreyAccent" parent="WhiteTint">
<item name="colorAccent">@color/blue_grey_400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/cyan_700</item>
</style>
<style name="CyanAccent">
<style name="CyanAccent" parent="BlackTint">
<item name="colorAccent">@color/cyan_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/deep_orange_700</item>
</style>
<style name="DeepOrangeAccent">
<style name="DeepOrangeAccent" parent="WhiteTint">
<item name="colorAccent">@color/deep_orange_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/deep_purple_700</item>
</style>
<style name="DeepPurpleAccent">
<style name="DeepPurpleAccent" parent="WhiteTint">
<item name="colorAccent">@color/deep_purple_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/green_700</item>
</style>
<style name="GreenAccent">
<style name="GreenAccent" parent="BlackTint">
<item name="colorAccent">@color/green_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/indigo_700</item>
</style>
<style name="IndigoAccent">
<style name="IndigoAccent" parent="WhiteTint">
<item name="colorAccent">@color/indigo_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/light_blue_700</item>
</style>
<style name="LightBlueAccent">
<style name="LightBlueAccent" parent="BlackTint">
<item name="colorAccent">@color/light_blue_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/light_green_700</item>
</style>
<style name="LightGreenAccent">
<style name="LightGreenAccent" parent="BlackTint">
<item name="colorAccent">@color/light_green_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/lime_700</item>
</style>
<style name="LimeAccent">
<style name="LimeAccent" parent="BlackTint">
<item name="colorAccent">@color/lime_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/orange_700</item>
</style>
<style name="OrangeAccent">
<style name="OrangeAccent" parent="BlackTint">
<item name="colorAccent">@color/orange_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/pink_700</item>
</style>
<style name="PinkAccent">
<style name="PinkAccent" parent="WhiteTint">
<item name="colorAccent">@color/pink_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/purple_700</item>
</style>
<style name="PurpleAccent">
<style name="PurpleAccent" parent="WhiteTint">
<item name="colorAccent">@color/purple_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/red_700</item>
</style>
<style name="RedAccent">
<style name="RedAccent" parent="WhiteTint">
<item name="colorAccent">@color/red_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/teal_700</item>
</style>
<style name="TealAccent">
<style name="TealAccent" parent="BlackTint">
<item name="colorAccent">@color/teal_a400</item>
</style>

@ -6,7 +6,7 @@
<item name="colorPrimaryDark">@color/yellow_700</item>
</style>
<style name="YellowAccent">
<style name="YellowAccent" parent="BlackTint">
<item name="colorAccent">@color/yellow_a400</item>
</style>

Loading…
Cancel
Save