我需要在键盘上添加完成按钮
我尝试添加
机器人:imeOptions =" actionDone" 机器人:imeActionLabel =" DONE" 到我的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"
/>
但我只在横向模式下完成,我怎么能在Enter内部完成
答案 0 :(得分:1)
键盘显示的内容完全取决于键盘(这是它自己的应用程序)。它可能决定尊重您的要求,也可能不会。没有办法强迫它 - 你尽可能多地要求它这样做。
答案 1 :(得分:1)
添加
android:imeOptions="actionDone"
android:singleLine="true"
答案 2 :(得分:0)
我发现答案谢谢@Gabe我需要设计自己的键盘
但我可以将Enter按钮的功能更改为Done 如果我将此代码添加到我的Edittext
android:singleLine="true"