Skip to content

Instantly share code, notes, and snippets.

@ryokosuge
Last active August 29, 2015 14:04
Show Gist options
  • Save ryokosuge/6799e00de7923b5c6b95 to your computer and use it in GitHub Desktop.
Save ryokosuge/6799e00de7923b5c6b95 to your computer and use it in GitHub Desktop.
【Android】SearchViewを使って検索画面を実装する rel : http://blog.ryochin.xyz/archives/80
EditText editText = (EditText)this.findViewById(R.id.edit_text);
editText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (event != null && event.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
// ここに処理
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment