From 1e23cfcb0ab5e27fe845691b65229242e96f5789 Mon Sep 17 00:00:00 2001 From: iwgeric Date: Tue, 3 May 2016 16:42:27 -0400 Subject: [PATCH] Add Menu to Test Chooser Activity. Provides way to enable/disable the following when starting a test: Mouse Events, Joystick Events, Key Events, Verbose Logging. --- .../jme3androidexamples/MainActivity.java | 3 ++- .../src/main/res/menu/menu_items.xml | 20 +++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/MainActivity.java b/jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/MainActivity.java index c3701b8c5..965ea19f6 100644 --- a/jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/MainActivity.java +++ b/jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/MainActivity.java @@ -4,6 +4,7 @@ import android.app.Activity; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.os.Bundle; +import android.support.v7.app.AppCompatActivity; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; @@ -30,7 +31,7 @@ import java.util.List; * applications that are started via TestsHarness Activity. * @author iwgeric */ -public class MainActivity extends Activity implements OnItemClickListener, View.OnClickListener, TextWatcher { +public class MainActivity extends AppCompatActivity implements OnItemClickListener, View.OnClickListener, TextWatcher { private static final String TAG = "MainActivity"; /** diff --git a/jme3-android-examples/src/main/res/menu/menu_items.xml b/jme3-android-examples/src/main/res/menu/menu_items.xml index 4e00f6a9b..08b18f18f 100644 --- a/jme3-android-examples/src/main/res/menu/menu_items.xml +++ b/jme3-android-examples/src/main/res/menu/menu_items.xml @@ -9,23 +9,23 @@ android:id="@+id/optionMouseEvents" android:orderInCategory="100" android:title="@string/strOptionEnableMouseEventsTitle" - app:showAsAction="ifRoom" /> + app:showAsAction="never" /> + app:showAsAction="never" /> + android:id="@+id/optionKeyEvents" + android:orderInCategory="300" + android:title="@string/strOptionEnableKeyEventsTitle" + app:showAsAction="never" /> + android:id="@+id/optionVerboseLogging" + android:orderInCategory="300" + android:title="@string/strOptionEnableVerboseLoggingTitle" + app:showAsAction="never" />