更改默认的 TextInputLayout 样式?

Change default TextInputLayout style?

我正在使用 Material 设计组件并想要更改 TextInputLayout 的默认样式,这意味着我的更改将应用​​于 TextInputLayout 的所有实例而无需我明确地为每个定义一个 style="@style/my_style"

如果可能,怎么可能?

您可以在您的应用主题中使用 textInputStyle 属性。

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