Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可能过度硬件菜单按钮?当我点击硬件菜单按钮时,出现新的布局页面,而不是子菜单视图?我的基本应用程序没有任何设置,所以只有我想要的是积分页面。我尝试了很多选择。我的意思是这样的:
@override public boolean onCreateOptionsMenu() { setContentView(R.layout.credits); }
每一个帮助都会很棒。
来自选项菜单 您必须返回 true 才能显示菜单;如果您返回 false 则不会显示。
所以你可以使用
@override public boolean onCreateOptionsMenu() { setContentView(R.layout.credits); return false; }