Change Line Color of EditText - Android

前端 未结 9 1083
夕颜
夕颜 2020-12-16 02:13

Can I change the line color on EditText. When is active it has some greenish color.\"Image\"

Is it

相关标签:
9条回答
  • 2020-12-16 02:53
    <EditText
                android:id="@+id/editText1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:background="@drawable/text"
                android:ems="10"
                android:textColorHint="#fefefe"
                android:hint="@string/text1"
                android:textColor="#fefefe"
                android:inputType="textEmailAddress"
                android:layout_marginTop="10dp"
    />
    

    Use the below code in your res/drawable/text.xml

    <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
      <item android:top="24.0dp">
       <shape >
          <solid android:color="#fefefe"  />
       </shape>
       </item>
    </layer-list>
    
    0 讨论(0)
  • 2020-12-16 02:57

    you can set android:backgroundTint="@color/blue" to change the color of the Edittext bottom line

    0 讨论(0)
  • 2020-12-16 03:00

    I had the same problem solved it by changing the color of the backgroundTint as follows -

    android:backgroundTint="@color/light_color"

    0 讨论(0)
提交回复
热议问题