在EditText中没有光标
问题描述:
当我触摸我的EditText时,虚拟键盘打开,我可以编辑文本,但没有光标告诉我下一个字符将在哪里,并且没有蓝色矩形形状可以告诉我我是否触摸了EditText或触摸了EditText。在EditText中没有光标
的代码是:
<EditText
android:id="@+id/search_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FCFCFC"
android:hint="\?"
android:inputType="text"
android:text=""
android:textColor="#000000"
android:textSize="24sp" />
我做了什么错了或者我需要添加什么?
答
将android:textCursorDrawable属性设置为@null应导致使用android:textColor作为游标颜色。
它会工作
+0
它不,即使在我指定android之后:cursorVisible =“true” – Ran
+0
查看我编辑的代码@Ran我希望它对你有用 –
你使用什么主题? – Shaishav
'插入符号','光标'是*竖线的词。 * :) –
我使用@ style/Theme.AppCompat.Light.NoActionBar主题。 android:cursorVisible =“true”不起作用,我没有使用脱字符号。 – Ran