选项菜单没有出现在某些设备上的操作栏
答
在onCreate
方法将这个:
try {
ViewConfiguration config = ViewConfiguration.get(this);
Field menuKeyField = ViewConfiguration.class
.getDeclaredField("sHasPermanentMenuKey");
if (menuKeyField != null) {
menuKeyField.setAccessible(true);
menuKeyField.setBoolean(config, false);
}
} catch (Exception ex) {
}
什么进口是田野? – 2014-09-24 07:38:26
import java.lang.reflect.Field – 2014-09-24 07:40:06