Skip to content

Instantly share code, notes, and snippets.

@goodev
Forked from skyisle/gist:3870191
Created March 11, 2014 03:38
Show Gist options
  • Save goodev/9479062 to your computer and use it in GitHub Desktop.
Save goodev/9479062 to your computer and use it in GitHub Desktop.
try {
// force to use overflow menu
ViewConfiguration config = ViewConfiguration.get(this);
Field menuKeyField = ViewConfiguration.class
.getDeclaredField("sHasPermanentMenuKey");
if (menuKeyField != null) {
menuKeyField.setAccessible(true);
menuKeyField.setBoolean(config, false);
}
} catch (Exception ex) {
// Ignore
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment