Android导航栏菜单强制转换

private void getOverflowMenu() {
ViewConfiguration viewConfig = ViewConfiguration.get(this);
try {
Field overflowMenuField = ViewConfiguration.class
.getDeclaredField("sHasPermanentMenuKey");
if (null != overflowMenuField) {
overflowMenuField.setAccessible(true);
overflowMenuField.set(viewConfig, false);
}
} catch (NoSuchFieldException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}

上一篇:GDB使用


下一篇:SVN学习一