I have a layout with a listview and an EditText. I ve created a menu with some options.
The problem is: When the Textview is focused, the native menu button doesnt work (This only happens for Samsung Smartphones) !
How can I solve this ?
Thanks
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.
I had a similar problem with EditText. I used setOnKeyListener() on the Edit Text. The EditText would get the focus as soon as the Activity started and it was trashing the menu key action so onCreateOptionsMenu() was not being called.
Adding
on the EditText OnKeyListener.onKey() methodfixed the problem.