本文介紹了actionDone imeOption 不適用于 Android 2.3 中的 EditText的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
限時送ChatGPT賬號..
我在 Android 2.3 中使用 EditText
時遇到問題.
I have a problem using an EditText
in Android 2.3.
我有一個用 android:imeOptions="actionDone"
屬性定義的 EditText
但是當我通過虛擬鍵盤書寫時,返回鍵沒有檢測到 actionDone
并引入了一條返回線.
I have an EditText
defined with android:imeOptions="actionDone"
property but when I'm writing by the virtual keyboard the return key doesn't detect the actionDone
and it introduce a return line.
在 Android 2.2 中工作正常.
In Android 2.2 is working right.
<EditText android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:imeOptions="actionDone" />
推薦答案
我已經(jīng)解決了這個問題.我添加了 android:singleLine="true"
屬性,它工作正常.
I have resolved this issue. I have added the android:singleLine="true"
property and it works right.
<EditText android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:imeOptions="actionDone"
android:singleLine="true"
/>
這篇關于actionDone imeOption 不適用于 Android 2.3 中的 EditText的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!