Skip to content

Instantly share code, notes, and snippets.

@lethargicpanda
Created January 7, 2013 05:32
Show Gist options
  • Save lethargicpanda/4472672 to your computer and use it in GitHub Desktop.
Save lethargicpanda/4472672 to your computer and use it in GitHub Desktop.
Test if the current device has a hardware menu button.
[...]
if (VERSION.SDK_INT >= 11 && !ViewConfiguration.get(getActivity()).hasPermanentMenuKey()) {
// DOESN'T HAVE a hardware menu button
// Do stuff...
} else {
// HAS a hardware menu button
// Do stuff...
}
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment