Change Change the text The underlined color will be the same if you do not focus and focus

enter image description hereMy underline editing is always emphasized when I am focused, I tried to ensure that all lines are the same color as the first in the picture, here is my XML code, does anyone know how to select all three lines (even if the other editing text is not focused )? Thanks in advance.

<EditText
        android:id="@+id/edit_password_second"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="textPassword"
        android:textColor="@color/edit_text_color"
        android:backgroundTint="@color/edit_text_color"
+4
source share
2 answers

You can try to add a topic.

<style name="EditTextTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorControlNormal">@color/primary</item>
<item name="colorControlActivated">@color/primary</item>
<item name="colorControlHighlight">@color/primary</item>
</style>

and set it to your EditText

<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/EditTextTheme">
</EditText>
+4
source

Go to styles.xmland change <item name="colorAccent">#YOUR_COLOR</item>to the same color as your backgroundTint EditText

+2
source

Source: https://habr.com/ru/post/1677566/


All Articles