以编程方式动态更改TextInputLayout的“焦点”颜色

时间:2018-07-10 11:26:36

标签: android android-layout kotlin android-textinputlayout

我正在使用Kotlin开发一个Android应用。

我被要求实现一项功能,用户在注册时选择一种颜色,而该颜色后来成为该用户在应用中的主要颜色。操作栏,按钮和textinputlayouts应该更改的颜色。

Before the user picks a color (app default theme color)

This is where I reached after the user picks the color from the color picker.

您知道如何相应地更改textinputlayouts的颜色吗?

预先感谢

1 个答案:

答案 0 :(得分:0)

更改应用主题中的颜色强调

 <item name="colorAccent">@color/Color Name</item>