I created a little app that has a search bar. now I want to know if I can handle the situation when a user press the Enter key. so the app can call the buttonOnClickListener() that actually perform the search?
Asked
Active
Viewed 1,813 times
-3
udondan
- 57,263
- 20
- 190
- 175
Pedro Teran
- 1,200
- 3
- 17
- 43
1 Answers
1
for handling you Search button on keyboard, you can refer here.
Android - Handle “Enter” in an EditText
and for performing the same action as buttonOnClickListener(View) do something like this:
yourSearchButton.performClick();
Community
- 1
- 1
Adil Soomro
- 37,609
- 9
- 103
- 153