Created
October 11, 2012 04:37
-
-
Save skyisle/3870191 to your computer and use it in GitHub Desktop.
Force to use overflow menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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