ell*_*n6a 29 android android-softkeyboard android-edittext
是否可以隐藏特定的键盘按钮?我有一个EditText
和一些设备上它的键盘有笑脸,而在其他设备上它缺少.我想在所有设备上隐藏它.
以下是我的XML EditText
:
android:id="@+id/text_editor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignWithParentIfMissing="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/send_side"
android:hint="Enter your text"
android:imeOptions="actionSend|flagNoEnterAction"
android:inputType="textLongMessage|textAutoCorrect|textCapSentences|textMultiLine"
android:maxLength="1000"
android:maxLines="3"
android:nextFocusRight="@+id/send_button"
android:padding="12dp"
android:textSize="13sp"
Run Code Online (Sandbox Code Playgroud)
我不得不说我是Android新手,如果不可能,我想知道原因.
谢谢您的帮助.
(为了完整起见)
此解决方案适用于需要在软键盘上没有笑脸的情况下进行textview的人.@ Adrian的解决方案,使用电子邮件地址类型,但它会在键盘上显示不必要的"@"和".com"按钮.我尝试了几种InputType组合和最佳解决方案恕我直言如下:
mTextView.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
16798 次 |
最近记录: |