tags:

views:

94

answers:

2

how do I make a navigation bar like this?

http://www.freeimagehosting.net/uploads/8aa355f9ef.png

+1  A: 

I guess you are porting an iPhone app to Android.

Please, avoid that kind of things. Android has a hard back button, it doesn't need a Navigation Bar as iPhone.

Think why you need a navigation bar, and how would you do it in Android. Look at this article to get some cool ideas. Good Luck.

Macarse
Yes, I want a bar very similar to that ... but the source code of this implementation is not yet available = /I understood perfectly what you meant macarse as it has a menu button. But I think more beautiful for an application has a toolbar at the top with two (only two) buttons ... =)thanks anyway ...
Sand
A: 

I still think that porting the iPhone UI is a bad idea - the iPhone has those lame bars out of necessity because of its complete lack of buttons and native menus. The great thing about Android's menus is that you don't waste any precious screen retail space for the menu, and the user can press the menu button at any time to get to whatever button you want (in this case, just "Add" - "Back" is already handled via the back button). Menus can be created very easily. Remember that there are phones like the Droid Eris that have a very small resolution.

If you really insist on bringing terrible iPhone concepts to Android, then why not simply do a RelativeLayout for the bar? You can align on to the left edge, on to the right edge, and align the top edge of both elements, and you're done. You can also give that layout and style you want (to set the background color), and be done with it.

EboMike