On Feb 24, 4:15 pm, Houcem Berrayana <[email protected]>
wrote:
> This is my little code :
>
> options.setOnClickListener(new OnClickListener() {
>
>                         @Override
>                         public void onClick(View v) {
>                                 mActivity.runOnUiThread(new Runnable() {
>
>                                         @Override
>                                         public void run() {
>                                                 mActivity.openOptionsMenu();
>                                         }
>                                 });
>
>                         }
>         });
>
> I was using the android standard emulator.. when pressing the physical
> button it show the menu. However when I do it directly for the first
> time programmaticaly it rises an exception !
>

without stacktrace its hard to say anything

i was calling openOptionsMenu(); and it worked just fine

and i dont understand why you need to runOnUiThread inside onClick -
its weird

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to