美文网首页
EditText光标颜色修改

EditText光标颜色修改

作者: hao_developer | 来源:发表于2022-01-05 11:29 被阅读0次

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" />

相关文章

网友评论

      本文标题:EditText光标颜色修改

      本文链接:https://www.haomeiwen.com/subject/ytuyqrtx.html