I've defined an specific TextInputLayout style, modifing the Widget.MaterialComponents.TextInputLayout.OutlinedBox
<style name="TextInput" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<item name="boxBackgroundMode">outline</item>
<item name="boxBackgroundColor">@color/inputBackground</item>
<item name="boxCollapsedPaddingTop">12dp</item>
</style>
Now I want to apply this style to all the TextInputLayouts. I can add the style to all the textInputLayouts, but, can I add it to my theme as the default style? How?
Thanks
Just override the textInputStyle
attribute in your app theme:
<style name="AppTheme" parent="Theme.MaterialComponents.Light">
<item name="textInputStyle">@style/TextInput</item>
<!-- Default value is: <item name="textInputStyle">@style/Widget.MaterialComponents.TextInputLayout.FilledBox</item> -->
</style>