I would like to start MyActivity class when the user clicks on the search button on the handset.
Are there any strategies you can suggest for this? Any code examples would be very useful.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are two places you can consider:
onKeyUp(int keyCode, KeyEvent event), and checkkeyCode == KeyEvent.KEYCODE_SEARCHsearchable.xmlAPI which can be exposed by using anandroid.intent.action.SEARCHintent-filter. This is forwards compatible, so is probably better if you are constrained to this version of the API. There is a compare/contrast document.This is probably not what you’re looking for directly, but I think should help solve the problem you’re trying to solve.