Last active
August 29, 2015 14:04
-
-
Save ryokosuge/6799e00de7923b5c6b95 to your computer and use it in GitHub Desktop.
【Android】SearchViewを使って検索画面を実装する rel : http://blog.ryochin.xyz/archives/80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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