hey … i want to open up options menu by clicking upon my own created button … is it possible ? if so, please help me out … thanks in advance
A:
Use the openOptionsMenu()
method of your Activity
to open the Menu programatically.
Still, what Nikola said is right - you'd be better conforming with Android's guidelines.
Dimitar Dimitrov
2010-03-15 09:18:57
thanks fort your help ... it works ... the project i am working on requires to open up options menu by clicking on a customized button.have you done anything like adding a view on top of camera view? i have been exploring and experimenting for a couple of days but still i cant get it done. i hope you can help me out.
sam
2010-03-16 11:52:12
+1
A:
If you don't want to use the button of the phone, you have to do the following :
define a listener on your button:
openMenuButton = (Button) findViewById(R.id.yourButton);
openMenuButton .setOnClickListener(this);
and then in the method onClick(), add :
openOptionsMenu()
Sephy
2010-03-15 10:13:28
thanks Sephy ... it works ... have you done anything like showing something on top of camera view?
sam
2010-03-16 11:48:06