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

Other Threads

1. Android and XMLHttpRequest()

Hi all,

does the default browser in Android support JS/AJAX and the
object? Running it in small test scripts using the browser in the
emulator does
not seem to (a) generate the correct set of HTTP headers (no Content-
Type or
Length, no GET statement and instead it shows an OPTIONS entry -
that is) and (b) ir repeats itself every couple of seconds as if it
thinks the server
has not responded yet and it needs to send the request again.

Has anyone used this object in Android in the default browser? Any



2. enable V8 snapshot is easy to crash by SIGILL

in my mydroid build (fFRG-83)
I found emulator default uses JavaScriptCode as default
so I export JS_ENGINE:= v8 to make webkit uses V8

but after this I found Browser becomes easy to crash by SIGILL
after some investigation I found this crash is happened when enabling
snapshot feature

in external/v8/Android.mk
I comment off this line and the crash disappears

but it seems this crash wont happen on device

so what should I do to investigate the generated code by
snapshot(libraries.cc) is correct or not


unsubscribe: android-porting+unsubscr...@googlegroups.com

3. OMA DRM forward lock


5. Enabling NETFILTER and iptables command

6. GK:How to give conditions in android XMLs

7. SQLiteException thrown during rawQuery()