me.at.coding
me.at.coding

Reputation: 17796

Change default TextInputLayout style?

I am using Material Design Components and want to change the default style of a TextInputLayout, meaning my changes shall apply to all instances of the TextInputLayout without me having to explicitely define a style="@style/my_style" on each of them.

If and how is that possible?

Upvotes: 1

Views: 145

Answers (1)

Gabriele Mariotti
Gabriele Mariotti

Reputation: 365138

You can use the textInputStyle attribute in your app theme.

<style name="AppTheme" parent="Theme.MaterialComponents.DayNight"> 
   <item name="textInputStyle">@style/myCustomStyle</item>
</style>

Upvotes: 1

Related Questions