如果用户点击Android中的三个点图像,有人可以解释如何显示操作栏溢出菜单吗?是否可以在Android中显示?
感谢。
答案 0 :(得分:0)
我没有权力添加评论,但根据您的问题,在我看来,您希望明确显示溢出按钮,就像覆盖它一样。有这个人在这篇文章中写过这篇文章,我将在这里重复一遍:
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();
}
}
帖子在这里 - Android action bar not showing overflow。
检查上述帖子。