Android button elements table for outlined button
The following examples show tables for the Android outlined button with asset attributes in separate tables vs asset attributes in one table.
Outlined button elements, multiple tables
Anatomy and key properties
An outlined button has a text label, a stroked container and an optional icon.
A. Text label
B. Container
C. Icon
Text label attributes
Attribute
Related method(s)
Default value
Text label
android:text
setTextgetText
null
Color
android:textColor
setTextColorgetTextColor
?attr/colorPrimary
Typography
android:textAppearance
setTextAppearance
?attr/textAppearanceButton
Container attributes
Attribute
Related method(s)
Default value
Color
app:backgroundTint
setBackgroundColorsetBackgroundTintListgetBackgroundTintList
@android:color/transparent
Stroke color
app:strokeColor
setStrokeColorsetStrokeColorResourcegetStrokeColor
?attr/colorOnSurface at 12% opacity
Stroke width
app:strokeWidth
setStrokeWidthsetStrokeWidthResourcegetStrokeWidth
1dp
Shape
app:shapeAppearance
setShapeAppearanceModelgetShapeAppearanceModel
?attr/shapeAppearanceSmallComponent
Elevation
app:elevation
setElevationgetElevation
0dp
Ripple color
app:rippleColor
setRippleColorsetRippleColorResourcegetRippleColor
?attr/colorPrimary at 12% opacity (pressed)
Icon attributes
Attribute
Related method(s)
Default value
Icon
app:icon
setIconsetIconResourcegetIcon
null
Color
app:iconTint
setIconTintsetIconTintResourcegetIconTint
?attr/colorPrimary
Size
app:iconSize
setIconSizegetIconSize
wrap_content
Gravity (position relative to text label)
app:iconGravity
setIconGravitygetIconGravity
start
Padding (space between icon and text label)
app:iconPadding
setIconPaddinggetIconPadding
4dp
Styles
Style
Default style
Widget.MaterialComponents.Button.OutlinedButton
Icon style
Widget.MaterialComponents.Button.OutlinedButton.Icon
Default style theme attribute: ?attr/materialButtonOutlinedStyle
See the full list of styles and attrs .
Outlined button elements, single table
Anatomy and key properties
An outlined button has a text label, a stroked container and an optional icon.
A. Text label
B. Container
C. Icon
Attributes
Attribute
Related method(s)
Default value
Text label
android:text
setTextgetText
null
Text label color
android:textColor
setTextColorgetTextColor
?attr/colorPrimary
Text label typography
android:textAppearance
setTextAppearance
?attr/textAppearanceButton
Container color
app:backgroundTint
setBackgroundColorsetBackgroundTintListgetBackgroundTintList
@android:color/transparent
Container stroke color
app:strokeColor
setStrokeColorsetStrokeColorResourcegetStrokeColor
?attr/colorOnSurface at 12% opacity
Container stroke width
app:strokeWidth
setStrokeWidthsetStrokeWidthResourcegetStrokeWidth
1dp
Container shape
app:shapeAppearance
setShapeAppearanceModelgetShapeAppearanceModel
?attr/shapeAppearanceSmallComponent
Container elevation
app:elevation
setElevationgetElevation
0dp
Container ripple color
app:rippleColor
setRippleColorsetRippleColorResourcegetRippleColor
?attr/colorPrimary at 12% opacity (pressed)
Icon
app:icon
setIconsetIconResourcegetIcon
null
Icon color
app:iconTint
setIconTintsetIconTintResourcegetIconTint
?attr/colorPrimary
Icon size
app:iconSize
setIconSizegetIconSize
wrap_content
Icon gravity (position relative to text label)
app:iconGravity
setIconGravitygetIconGravity
start
Icon padding (space between icon and text label)
app:iconPadding
setIconPaddinggetIconPadding
4dp
Styles
Style
Default style
Widget.MaterialComponents.Button.OutlinedButton
Icon style
Widget.MaterialComponents.Button.OutlinedButton.Icon
Default style theme attribute: ?attr/materialButtonOutlinedStyle
See the full list of styles and attrs .