samedi 9 mai 2015

How to disable hardware menu button popup action items on S3?

I just test my app on a Galaxy S3. It has a hardware menu button on the phone.

I'm using one Activity to hold some fragments, each fragments has their own action bar items to be displayed. It works well on other phone, and just for action bar part, it works well on S3.

My problem is on S3, when I click that hardware menu button, it pop up a list includes all current action items name defined on the fragment. The popup list is on the bottom of the screen. Please see the screenshot below.

I wonder if there a way that I could disable this behavior? I hope the app will ignore the click of hardware menu button, and just let user use the button on action bar. I have tried using dispatchKeyEvent, with check KEYCOD_MENU, but seems not work.

Thank you!

enter image description here

Aucun commentaire:

Enregistrer un commentaire