Android Material Design Button Styles

I’m confused on button styles for material design. I’d like to get colorful raised buttons like in the attached link., like the “force stop” and “uninstall” buttons seen under the usage section. Are there available styles or do I need to define them?

http://www.google.com/design/spec/components/buttons.html#buttons-usage

I couldn’t find the default button styles.

Example:

 <Button style="@style/PrimaryButton"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Calculate"
    android:id="@+id/button3"
    android:layout_below="@+id/editText5"
    android:layout_alignEnd="@+id/editText5"
    android:enabled="true" />

If I try to change the background color of the button by adding

    android:background="@color/primary"

all of the styles go away, such as the touch animation, shadow, rounded corner, etc.

12 Answers
12

Leave a Comment