I am a little confused. I want to show the remaining items of the action bar inside the three dot item. But i always lose it when the number of items increases ! after googling a little, i found this "useful" method : ASMUIRTI ANSWER
private 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();
}
}
I tested it and that work as i want. Unfortunately, triing to better understand what does this method do, i found that it's an awful hack that breaks consistency with the rest of the apps on the platform (adamp's comment)
Can somebody tell me why it's a hack, and what is the best solution ?