package app.test;
import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener;
public class Test extends Activity implements OnEditorActionListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
EditText text1 = (EditText) findViewById(R.id.text1);
text1.setOnEditorActionListener(this);
EditText text2 = (EditText) findViewById(R.id.text2);
text2.setOnEditorActionListener(this);
}
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
return false;
}
}
//main.xml
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
android:id="@+id/text1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:imeOptions="actionSearch"
/>
android:id="@+id/text2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:imeOptions="actionGo"
/>