Pregunta

I am creating an app using Wikitude API, but I haven't been able to customize the view.

I have asked the developers and I know I can't add buttons to the main view in the current release version (for Android), but I am wondering if I can add more buttons to the options menu. Right now when I press it I get just one button that says "Ignore Altitude" can I modify that button and/or add more buttons to that menu?

I have checked other posts but there aren't any answers. The posts are a little bit old so that is why I am asking again. I haven't found any useful documentation.

Any help is greatly appreciated

¿Fue útil?

Solución

if I understood your question correctly, then please try the following: in the method prepareIntent() of your main Activity, you can add up to 3 menu items:

intent.setMenuItem1("Menu 1", YourActivity.CALLBACK_INTENT);
intent.setMenuItem2("Menu 2", YourActivity.ANOTHERCALLBACK_INTENT);

Then you define the callback function as another activity (with dialog, list and stuffs). It works fine this way for me. I am also playing around a bit with Wikitude, but hard to find something well documented!

Otros consejos

Yes , You can Add upto three menu button as if you read doc properly

     intent.setMenuItem1("Menu Name", YourActivity.LOCATION_INTENT);
    intent.setMenuItem2("Menu Name", YourActivity.LOCATION_THREATS);
    intent.setMenuItem3("Menu Name", YourActivity.MAP_INTENT);

With making Intent variable as

public static final String LOCATION_INTENT = "wikitudeapi.mylocationactivity";

Also declare action in manifest as,

                 <activity android:name=".activities.Your Activity Name"
        android:theme="@*android:style/Theme.Translucent.NoTitleBar"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="wikitudeapi.mylocationactivity" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top