Can I change the line color on EditText
. When is active it has some greenish color.
Is it possible to change only the color of line when is active, and how can I do this...?
Can I change the line color on EditText
. When is active it has some greenish color.
Is it possible to change only the color of line when is active, and how can I do this...?
You need to set background source for an edit text.
android:background="@drawable/my_theme_edit_text"
for the customEditText
. Or you can set that background in your app theme - you will find example in .zip file from that siteUse the below code in your res/drawable/text.xml
add to your themes.xml this line:
this sets the default color for
colorControlActivated
which is used to tint widgetsYou can set background of edittext to a rectangle with minus padding on left, right and top to achieve this.
Here is the xml example for setting different line colors for focused and not focused edittext, just set it as background of edittext.
Here you are:
If your using TextInputLayouts for EditText, we should change the following properties.
By default colour is colorAccent.