安卓:始终显示菜单栏/静态菜单栏 [英] Android: always show menu bar/static menu bar
问题描述
我想使用菜单栏,而不是标签栏(标签不为是在视图的底部做...)。
I would like to use the menu bar instead of a tab bar (tabs are not made for being at the bottom of the view ...).
有没有可能给菜单栏上的静态行为?
Is there any chance to give the menu bar a static behaviour?
相关岗位:
<一href=\"http://stackoverflow.com/questions/2392828/android-set-the-menu-out-visible\">http://stackoverflow.com/questions/2392828/android-set-the-menu-out-visible与解决方案:
新的处理程序()postDelayed(新的Runnable(){公共无效的run(){openOptionsMenu();}},2000);
Related post: http://stackoverflow.com/questions/2392828/android-set-the-menu-out-visible with the solution: new Handler().postDelayed(new Runnable() { public void run() { openOptionsMenu(); } }, 2000);
它工作正常,但不断地隐藏了。
It works fine, but hides away constantly.
许多thankx!
推荐答案
这听起来像你想滥用菜单功能。可能是什么解决方法:创建具有内另外两个布局垂直的LinearLayout。让最上面的一个已经layout_weight =1,在这里把你的内容。在底部的一个地方,图像或按钮或类似的,你可以使看起来像选项卡选项或任何你想要的。
It sounds like you're trying to abuse menu functionalities. What could be the solution: create a vertical LinearLayout with two additional layouts inside. Let the top one have layout_weight="1" and here place your content. In the bottom one place images or buttons or similar, which you could make look like tab options or whatever you want.
这篇关于安卓:始终显示菜单栏/静态菜单栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!