ime actionGo simply won’t work on certain devices, like the HTC Evo 4G. It works on Motorola Atrix and Droid X.
Here is the code:
<EditText
android:id="@+id/password"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:hint="@string/password_hint"
android:password="true"
android:inputType="textPassword"
android:autoText="false"
android:imeOptions="actionGo"/>
TextView.OnEditorActionListener listener = new TextView.OnEditorActionListener()
{
public boolean onEditorAction(TextView exampleView, int actionId, KeyEvent event)
{
if(actionId == EditorInfo.IME_ACTION_GO)
{
loginValidation();
}
return true;
}};
password.setOnEditorActionListener(listener);
This seems to be a bug. Different manufacturers make a customized keyboard for their phone which may not completely behave as the android standard keyboard. This issue has been raised before. Most people overcome this issue by either overiding the onKey event or using a TextWatcher class. A bug has been filed about this
http://code.google.com/p/android/issues/detail?id=2882