Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save andhie/8ac6f7cd436e6dd5b654 to your computer and use it in GitHub Desktop.
<FrameLayout xmlns:android=""
The FAB widget inflates a default style which is available in
/sdk/extras/android/support/design/res/values. As per Material Design
guidelines, the FAB elevation is 6dp instead of the preset 8dp value.
Other default FAB values are correct with respect to the specs.
Thus to get the correct FAB, we only need to override app:elevation.
NOTE: it is app:elevation and NOT the API 21+ android:elevation.
NOTE2 : This FAB is not assigned any icon, just a solid colorAccent FAB
app:elevation="6dp" />
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/color_primary</item>
<item name="colorPrimaryDark">@color/color_primary_dark</item>
<item name="colorAccent">@color/color_accent</item>
<item name="android:windowBackground">@android:color/white</item>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment