I have a problem using an EditText
in Android 2.3.
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.
In Android 2.2 is working right.
<EditText android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:imeOptions="actionDone" />
Currently in Android Studio 2.2.3 if you use
IDE gives a warning that it has been deprecated use maxlines instead.
However maxLines does not solve the problem. The solution is to just add the attribute inputType. Example :
I have resolved this issue. I have added the
android:singleLine="true"
property and it works right.Another noteworthy point is that the
android:imeOptions
don't work if you specifyandroid:digits
. Not sure if this affects all android versions.