android - 在纵向模式下将 done 添加到默认 android 键盘
android - add done to default android keyboard in portrait mode
我需要在键盘上添加完成按钮
我的尝试我添加
android:imeOptions="actionDone"
android:imeActionLabel="DONE"
to my Edittext
<EditText
android:singleLine="true"
android:id="@+id/passwordtext"
android:layout_width="match_parent"
android:imeOptions="actionDone"
android:imeActionLabel="DONE"
android:layout_height="wrap_content"
android:ems="10"
android:hint="@string/password"
/>
但是我只在横向模式下完成了,我怎么能在内部关闭输入
键盘显示什么完全取决于键盘(它是自己的应用程序)。它可能会决定接受您的请求,也可能不会。没有办法强迫它——你已经尽力要求它这样做了。
我找到了答案谢谢@Gabe 我需要设计自己的键盘
但我可以将 Enter 按钮的功能更改为 Done
如果我将此代码添加到我的 Edittext
android:singleLine="true"
只需添加
android:imeOptions="actionDone"
android:singleLine="true"
我需要在键盘上添加完成按钮
我的尝试我添加
android:imeOptions="actionDone" android:imeActionLabel="DONE" to my Edittext
<EditText
android:singleLine="true"
android:id="@+id/passwordtext"
android:layout_width="match_parent"
android:imeOptions="actionDone"
android:imeActionLabel="DONE"
android:layout_height="wrap_content"
android:ems="10"
android:hint="@string/password"
/>
但是我只在横向模式下完成了,我怎么能在内部关闭输入
键盘显示什么完全取决于键盘(它是自己的应用程序)。它可能会决定接受您的请求,也可能不会。没有办法强迫它——你已经尽力要求它这样做了。
我找到了答案谢谢@Gabe 我需要设计自己的键盘
但我可以将 Enter 按钮的功能更改为 Done 如果我将此代码添加到我的 Edittext
android:singleLine="true"
只需添加
android:imeOptions="actionDone"
android:singleLine="true"