My app has an AutoCompleteTextView used for searching. When it’s in focus, I would like to disable or change the function of the return key to a specific function call. I tried in my layout xml to add the following property to the AutoCompleteTextView
android:imeOptions="actionDone"
But it works on my simulator (when you click enter, the keyboard disappears) but it doesn’t work on my device (moto droidx running 2.3.3).
Can someone show me how I can link the return key to a specific function (in my case, the search function) with android:imeOptions=”actionGo”?
Write your code in
setOnEditorActionListenerevent ofEditTextfamily. likeHappy coding 🙂