// this works for me
1- remove android:imeOptions="actionGo" from xml
2- also check the value of IME_NULL , since all these actions are treated as special keys, for example:
if(actionId==666 || actionId == EditorInfo.IME_NULL){ ... }
3- it is also better to use all resource files that are not hardcoded, for example, create a resource file in the values ββfolder that calls it ids.xml, and here is what it looks like:
<?xml version="1.0" encoding="utf-8"?> <resources> <item type="id" name="r_login" format="integer">1001</item> </resources>
and then your layout xml file should look like this:
android:imeActionId="@id/r_browse"
and your activity code should look like this:
if(actionId==R.id.r_browse || actionId == EditorInfo.IME_NULL){ ... }
Greetings;)
source share