Hi Question about menu

by 鏅鸿秴 钖 » Fri, 23 Apr 2010 08:05:08 GMT

Sponsored Links
 i want to realize button pop-up optionmenu,

i write a button setOnClickListener, check this could pop-up menu ,

how to made it?

my code is:

case R.id.tools:
if(myMenu==null) {
                                        myMenu.add(0, 0, 0, 
                                        myMenu.add(0, 1, 0, 

but method onCreateOptionsMenu(menu) not work;
type System.out.println("12334"); it could print ,but the menu not
anyone know how to make it work? or  had other way to pop-up menu


Hi Question about menu

by ~ TreKing » Fri, 23 Apr 2010 10:19:22 GMT


Try checking if (myMenu != null), since, you know, you probably want a valid
object to add stuff to.

TreKing - Chicago transit tracking app for Android-powered devices


Sponsored Links