EditText光标颜色修改

2022-01-05  本文已影响0人  hao_developer

my_cursor

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <solid android:color="@color/white"/>

    <size android:width="2dp" />

</shape>

使用

 <EditText
                android:layout_width="match_parent"
                android:layout_height="40dp"
                android:background="@null"
                android:hint="Enter Account"
                android:textColor="@color/white"
                android:textColorHint="@color/hui_65"
                android:textCursorDrawable="@drawable/my_cursor"
                android:textSize="15sp" />
上一篇 下一篇

猜你喜欢

热点阅读