开发者

Android Navigation Bar

I've done a great amount of searching and I can't seem to find anything that helps me. I'm new to Android programming (I do know Java though), and I am working on an app that deals with dynamic content being downloaded from a server. I would like to have开发者_开发知识库 a bottom navigation bar, that is persistent throughout the app. This nav bar will consist of 5 buttons, that when clicked will open a new activity. However I would like the activity to be loaded in the content area above the nav bar.

So basically I will have a layout that contains a content view and the nav controller. The nav controller should never change...the content view should load a new activity upon nav button click. Does anyone have any ideas? Thanks.


You will have to create a common layout for the navigation bar , and include it in every layout of the activity. use "include" tag in the xml to do this. please have a look at the discussion below, it may help you.

Common buttons or tabs at bottom for every activity


Have a look at this project: http://code.google.com/p/androidtabs/


You might want to consider looking at Fragments since the TabActivity is deprecated. You would need to download a compatibility package in the SDK in order to use it on pre-honeycomb devices. It should be able to do exactly as you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜