wervdon
wervdon

Reputation: 557

How can I make a button act like a menu?

I am working on a simple application that is supposed to work on 800x480 tablet. Currently:
[][][][]
[][][][]
OOO

These are all buttons and they are working as expected. I, however, need to add menu items to the bottom-buttons. When clicked, menu items should pop up.

-Can I create a menu and place it at the bottom of the screen to replace those buttons? If so, could you show an example, cause I couldn't find any.

-Or, can I add menu items to these buttons?

Upvotes: 0

Views: 378

Answers (1)

Opiatefuchs
Opiatefuchs

Reputation: 9870

What You want is an OptionsMenu, if I understand You the right way. I could give You an example later, I am not at home. But for now, look at this example. If You follow this, You don´t need those buttons at the bottom.

http://www.edumobile.org/android/android-beginner-tutorials/options-menu/

if it is not clear, just let me know and I try to give You an example at the evening...

EDIT

for custom menu, You could use PopUpMenu. I had not tried this for now, but I think it is a good solution

http://android-er.blogspot.de/2012/03/example-of-using-popupmenu.html

Upvotes: 1

Related Questions