当前位置: 代码迷 >> 综合 >> editview 中光标闪烁过程中,在消失时没有完全消失。
  详细解决方案

editview 中光标闪烁过程中,在消失时没有完全消失。

热度:24   发布时间:2023-12-21 00:50:59.0

该问题是因为光标宽度过大。 问题是在 android 4.4.4 上出现的。


<EditText

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:testColor = "#000000" 

android:textCursorDrawable="@drawable/color_cursor"/>


drawable/color_cursor.xml

<?xml version="1.0" encoding="utf-8"?>  

<shape xmlns:android="http://schemas.android.com/apk/res/android"  

    android:shape="rectangle">  

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

    <solid android:color="#000000"  />

</shape>