By default when a button is created in Android Studio, its appearance inherits the Material Design layout, in the Material Design style guide, it talks about Flat, Raised
Raised buttons, I think it is the default
flat button
Raised button
Summary of what I'm asking
- I see that the raised add that effect
glow
to raise it, how is it assigned? - How do you specify it to be styled as a flat button?
Final score
answer to
Raised Button.
Response for
Raised Button con elevación
(API +19)answer to
Flat Button.
More information: LINK
Another solution is to use the styles from the compatibility library, over one
Button
orAppCompatButton
Flat Button
For text-only buttons, text button, flat button:
Set the style to:
style="@style/Widget.AppCompat.Button.Borderless"
Colorful The color of the text will be the one defined in
colorAccent
the theme.Set the style to:
style="@style/Widget.AppCompat.Button.Borderless.Colored"
Personalization
For customization we can define our own style, in order to change the color of the text, wave color when pressed, only in those buttons that we want.
We change the color of the text in
<item name="colorAccent">
and the color of the shock wave in<item name="colorControlHighlight">
PrimaryFlatButton style
to use it on the use button
android:theme="@style/PrimaryFlatButton