0

对于我的应用程序,我打算设计如下:

http://img811.imageshack.us/img811/7045/problemel.png

-设计需要有一个标题栏,这确实是android中的操作栏。为了克服兼容性问题,我使用了 sherlock 操作栏,据说它支持没有操作栏的旧版本。但是,我还没有测试过旧设备。

-据我所知,对于导航,我们宁愿使用选项卡或下拉列表方法。我希望我的应用程序中的每个页面都有恒定的选项卡以站在页面下方。这反映了选项卡式操作栏,但是我希望它在下方,而不仅仅是在操作栏下方。我不知道如何,但 youtube 应用程序以某种方式将它放在屏幕中间(如果它不是自定义视图)。那么我们如何将标签放置在页面底部呢?

-Also I want to have another menu, whose items depend on the page it's on. But the apperance will be the same for every page. In the picture on the left this menu has buttons as "Bt 1" ,"Bt 2". I dont want to repeat the same xml for every activity page, but I'm not sure how to achieve it without repeating. If the action bar allowed using both navigation tabs and the drop down list, I could put the items of this menu in the dropdown list just as the picture on the right (onto the gray button). But I guess it does not?!

Therefore I have to repeat the menu xml code in every page or is there another smart way?

Any advice will be appreciated.

4

2 回答 2

1

This can be achieved not with tabs but by adding items to a linear_layout with a gravity of bottom but it is a bad practice as @D_Steve595 stated and should be avoided in android designs.

于 2013-06-15T14:39:35.847 回答
0
        actionBar.setHomeButtonEnabled(false);
        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
        actionBar.setDisplayShowTitleEnabled(false);
        actionBar.setDisplayShowHomeEnabled(false);
于 2014-03-26T07:39:08.403 回答