我正在尝试使用材质样式自定义TextInputLayout.我设法将聚焦状态设置为我想要的颜色:
运用
<com.google.android.material.textfield.TextInputLayout
style="@style/LoginTextInputLayoutStyle"
android:theme="@style/LoginTextInputLayoutStyle"
android:textColorHint="#fff"
app:boxStrokeColor="#fff"
.....>
<EditText ...
Run Code Online (Sandbox Code Playgroud)
风格在哪里:
<style name="LoginTextInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense">
<item name="colorAccent">#fff</item>
</style>
Run Code Online (Sandbox Code Playgroud)
但是当textinput没有聚焦时,我得到了这样的表情:
如何将黑线的颜色也改为白色.谢谢
android android-styles material-design android-textinputlayout