You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Everybody,
I am trying to create menu for drawing different object in same marker. that
menas if i switch cube menu it will be drawn cube and if i change menu to
triangle it will be drawn triangle but in same marker. But I don't understand
how i can do this. Basically I tried following way to implement menuitem in
customobject class:
package edu.dhbw.andar.pub;
public class CustomObject extends ARObject {
public CustomObject(String name, String patternName,
double markerWidth, double[] markerCenter) {
..............
..............}
public final void draw(GL10 gl) {
super.draw(gl);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add(0, MENU_SCREENSHOT, 0, getResources().getText(R.string.takescreenshot))
.setIcon(R.drawable.screenshoticon);
menu.add(0, MENU_SCREENSHOT1, 0, getResources().getText(R.string.takescreenshot1))
.setIcon(R.drawable.screenshoticon);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
...........
........
switch(item.getItemId()) {
case MENU_SCREENSHOT:
new TakeAsyncScreenshot().execute();
break;
}
switch(item.getItemId()) {
case MENU_SCREENSHOT1:
new TakeAsyncScreenshot().execute();
break;
}
class TakeAsyncScreenshot extends AsyncTask<Void, Void, Void> {
{
box.draw(gl);///should be call box function
}
but its seems no effect when press menu item after program open.
Anybody can help me that how i can implement differet menu item for drawing
different object in same marker.
Thanks
Rassall
Original issue reported on code.google.com by rassall....@gmail.com on 6 Oct 2010 at 5:00
The text was updated successfully, but these errors were encountered:
you can not override the method onCreateOptionsMenu of ARObject, because it
does not exist.
you have to implement your menu in an activity, as you can read in
http://developer.android.com/guide/topics/ui/menus.html
please use the google groups for anything that is not an bug report:
http://groups.google.de/group/andar_android_augmented_reality
i'm closing this issue because it is not an bug report.
Original comment by tdomhan on 6 Oct 2010 at 11:59
Original issue reported on code.google.com by
rassall....@gmail.com
on 6 Oct 2010 at 5:00The text was updated successfully, but these errors were encountered: