I'm currently trying to add a click listener to the menu hardware button. Currently I'm just putting my onclick logic into the onCreatePanelMenu-method and return false. But that just feels wrong.
Is there a more clean way?
The code currently looks like that:
@Override public boolean onCreatePanelMenu(int featureId, Menu menu) { Toast.makeText(this, "HALLO!", Toast.LENGTH_SHORT).show(); return false; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With