Android: How can I set a listener to the MenuButton?

后端 未结 4 1821
野性不改
野性不改 2020-12-16 15:29

I want to do a custom action when pressing on the Menu button on the phone.

Is it possible to set an onClickListener (or similar) on the button and if s

4条回答
  •  悲&欢浪女
    2020-12-16 15:43

    You could probably hack something in using "OnMenuOpened" or some such, but I really wouldn't recommend it. The menu button is only supposed to be used to show menus, so there is consistency between applications.

提交回复
热议问题