相关疑难解决方法(0)

更改TextInputLayout轮廓颜色

我正在尝试使用材质样式自定义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

37
推荐指数
6
解决办法
3万
查看次数