Im using android:imeOptions="actionGo" for a edit text box. Its working properly on Android default keyboard. I'm getting "GO" button . But if i try to change the input method to either swype or LG keyboard on my LG device , I'm not getting "Go" instead im getting enter symbol. Why this is happening . I want Go button regardless of wt keyboard im using. Please can any one help me in this ?
Please add following two lines to your edittext:
<EditText
android:singleLine="true"
android:imeOptions="actionGo"/>
This will enable Go
button on your softkeyboard
And to listen Go
button Add
editText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if(actionId== EditorInfo.IME_ACTION_GO){
//perfrom your action
}
return false;
}
});
Sadly not all manufacturer implements correctly their custom keyboard so you wont be able to have the "Go" button.
For instance, on HTC phones you won't get something else than a "enter button" even if you set a search action: android:imeOptions="actionSearch". On a Motorola Droid it works fine.
On some phones you have to set the imeOptions in java code to make it works. You can have a try on your LG.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With