【发布时间】:2016-02-10 18:27:19
【问题描述】:
在 Android 中输入编辑文本字段时,我需要删除下划线。对于名字,编辑文本的第一个字母应该是大写的,所以我给了textCapSentences,但在我的例子中,我在edittext字段中看到了下划线。如何删除它?
textFilter|textNoSuggestions|textCapSentences的所有组合我都试过了
这是我的名字编辑文本:
<EditText
android:id="@+id/signup_lname"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/signup_layer_bg2"
android:ems="10"
android:gravity="center"
android:hint="@string/signup_lname"
android:imeOptions="actionDone"
android:inputType="textFilter|textNoSuggestions|textCapSentences"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:singleLine="true"
android:textColor="@android:color/white"
android:textColorHint="@android:color/white"
android:textCursorDrawable="@drawable/custom_cursor" />
我的屏幕:
【问题讨论】:
-
我相信这是您的键盘,它强调了它正在为哪个单词提供更正。你用哪个键盘?
-
在此处查看替代解决方案:stackoverflow.com/a/62569902
-
这个解决方案对我有用:stackoverflow.com/a/62569902/5646794
标签: android android-edittext android-keypad android-inputtype