[英]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.我正在使用 Material Design Components 并希望更改
TextInputLayout
的默认样式,这意味着我的更改将应用于TextInputLayout
所有实例,而不必在每个实例上明确定义style="@style/my_style"
。
If and how is that possible?如果以及如何可能?
You can use the textInputStyle
attribute in your app theme.您可以在应用主题中使用
textInputStyle
属性。
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight">
<item name="textInputStyle">@style/myCustomStyle</item>
</style>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.