美文网首页
EditText自定义光标

EditText自定义光标

作者: 霸气却微笑 | 来源:发表于2021-04-10 16:16 被阅读0次

    1.EditText中添加:

        android:textCursorDrawable="@drawable/shape_cursor_white"
    

    2.shape_cursor_white.xml

      <?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自定义光标

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