Android method for changing EditText underline color style
preface
As we all know, when using appcompatedittext (edit text), the default underline follows the system's #ff4081 color value. You can change all color styles by changing this value
Sometimes you want to define the color style of an interface separately, you can do this:
1. Add the latest appcompat library to your build.gradle
2. Let your activity inherit android.support.v7.app.appcompatactivity
3. Declare your EditText in any layout.xml file
4. Declare custom styles in the styles.xml file
5. Apply this style to your EditText through the Android: theme attribute
The effects are as follows:
summary
The above is all about Android changing the underline color style of EditText. I hope the content of this article can bring some help to your study or work. If you have any questions, you can leave a message.