码迷,mamicode.com
首页 > 移动开发 > 详细

Android导航栏菜单强制转换

时间:2015-09-22 14:19:16      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:

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();
}

}

Android导航栏菜单强制转换

标签:

原文地址:http://www.cnblogs.com/ljbky/p/4828759.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!