Skip to content

Instantly share code, notes, and snippets.

View ultimaters's full-sized avatar
💭
I may be slow to respond.

Ultimaters ultimaters

💭
I may be slow to respond.
View GitHub Profile
public void getOverflowMenu() {
try {
ViewConfiguration config = ViewConfiguration.get(this);
Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey");
if(menuKeyField != null) {
menuKeyField.setAccessible(true);
menuKeyField.setBoolean(config, false);
}
} catch (Exception e) {
e.printStackTrace();