简体   繁体   中英

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?

You can use the textInputStyle attribute in your app theme.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM