简体   繁体   中英

creating a menu/actionbar with buttons text and buttons

EDIT: I am looking for a ActionBar Menu, not nessicarily a menu that just sits on the bottom of the screen.

I was looking at the menu XML object, I was building all of the menus and then will assign them accordingly with their click handles when the Activities load.

My issue is this: When looking on the Android website, there was a way to do:

[         Title        ]
[ b1 ][ b2 ][ b3 ][ b4 ]

but i wanted to do something like:

[ b1 ][ b2 ][ _Title_ ][ b3 ][ b4 ]

is it possible via adding items, or should i try a different approach, like populating a view with buttons and style the view so it acts like a menu?

You should look at ActionBarSherlock . It has extensive support and helps give a more unified Android experience emulating many of the standard Google Apps on the phone.

Its very customizable allowing you to place the actionbar on the top or the bottom. Likewise it allows you to place all content contained in the actionbar wherever you please.

loading a menu resolved the buttons. From inside of that list, you can tell certain things to always show. If you do that, could could use one of the menu items to NOT have a click listener and use it to display. As an alternate, you could use another program such as actionbarsherlock, but that was not the intent of the question. EVERYTHING can be solved with plugins, so it doesnt really "solve" the question, but abstracts it, in a way, deferring the solution to another source without really giving a proper how-to.

With that said, I did move to a different layout. Instead of me doing a title in the center, i actually, used a title in a slightly different location to maintain some nativity along with the design currently implemented in the iOS implementation of our application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM