actionDone imeOption doesn't work on EditText in Android 2.3

前端 未结 3 903
臣服心动
臣服心动 2020-12-14 00:39

I have a problem using an EditText in Android 2.3.

I have an EditText defined with android:imeOptions=\"actionDone\" property

3条回答
  •  长情又很酷
    2020-12-14 00:57

    Currently in Android Studio 2.2.3 if you use

    android:singleLine="true"
    

    IDE gives a warning that it has been deprecated use maxlines instead.

    android:maxLines="1"
    

    However maxLines does not solve the problem. The solution is to just add the attribute inputType. Example :

    
    

提交回复
热议问题