Issue: change border color or box stroke for unfocused TextInputLayout in android

前端 未结 3 2126
醉话见心
醉话见心 2020-12-24 13:00

I have a very specific issue for changing the outline of the textbox for TextInputLayout when it\'s unfocused. I can\'t seem to find an attribute to change the color for the

3条回答
  •  忘掉有多难
    2020-12-24 13:27

    If you want to set the color for the outline box in unfocused mode instead of the default black, you have to add this line in colors.xml file which will override the default color for the outline box.

    copy this line as it is. you can change color to what you want.

    #fff
    

    until now it will work, for more control on TextInputLayout you may add this style in styles.xml

    
    

    then add theme to TextInputLayout

    android:theme="@style/TextInputLayoutStyle"
    

提交回复
热议问题