[changed] GdxTester now uses GdxTests to enumerate all available tests.
[changed] moved all android test launchers to com.badlogic.gdx.tests.android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.badlogic.gdx"
+ package="com.badlogic.gdx.tests.android"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name"
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
+
+ <activity android:name=".GdxTestActivity" android:label="Gdx Test"/>
- <activity android:name=".SimpleTest" android:label="Simple Test"/>
+ <!-- <activity android:name=".SimpleTest" android:label="Simple Test"/>
<activity android:name=".MeshRendererTest" android:label="MeshRenderer Test"/>
<activity android:name=".LifeCycleTest" android:label="Life Cycle Test"/>
<activity android:name=".VertexBufferObjectTest" android:label="Vertex Buffer Object Test"/>
<activity android:name=".FillrateTest" android:label="Fillrate Test"/>
<activity android:name=".AlphaTest" android:label="Alpha Test"/>
<activity android:name=".BitmapFontTest" android:label="BitmapFont Test"/>
- <activity android:name=".BitmapFontFlipTest" android:label="BitmapFont Flip Test"/>
+ <activity android:name=".BitmapFontFlipTest" android:label="BitmapFont Flip Test"/>-->
</application>
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="5"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
+++ /dev/null
-/*******************************************************************************\r
- * Copyright 2010 mzechner\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the\r
- * License. You may obtain a copy of the License at\r
- * \r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"\r
- * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language\r
- * governing permissions and limitations under the License.\r
- ******************************************************************************/\r
-\r
-package com.badlogic.gdx;\r
-\r
-import android.app.ListActivity;\r
-import android.content.Intent;\r
-import android.os.Bundle;\r
-import android.view.View;\r
-import android.widget.ArrayAdapter;\r
-import android.widget.ListView;\r
-\r
-import com.badlogic.gdx.box2d.TestCollection;\r
-\r
-public class GDXTester extends ListActivity {\r
- String[] items = new String[] {"Life Cycle Test", "Simple Test", "Vertex Array Test", "Vertex Buffer Object Test",\r
- "MeshRenderer Test", "Fixed Point MeshRenderer Test", "Managed Test", "Text Test", "Sound Test", "Input Test", "Obj Test",\r
- "Fixed Point Test", "Float Test", "Lag Test", "Pong", "Audio Device Test", "Mpg123 Test", "Vorbis Test",\r
- "Performance Test", "Mesh Shader Test", "SpriteBatch Test", "SpriteBatch Shader Test", "FrameBuffer Test",\r
- "SpriteBatch Rotation Test", "Box2D Test", "Audio Recorder Test", "Box2D Test Collection", "Resources Test", "MD5 Test",\r
- "Micro Benchmarks", "Multitouch Test", "BufferUtils Test", "Terrain Test", "Water Ripples", "Stage Test", "Windowed Test",\r
- "Fillrate Test", "Alpha Test", "BitmapFont Test", "BitmapFont Flip Test"};\r
-\r
- @Override public void onCreate (Bundle savedInstanceState) {\r
- super.onCreate(savedInstanceState);\r
- setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, items));\r
- }\r
-\r
- protected void onListItemClick (ListView l, View v, int position, long id) {\r
- super.onListItemClick(l, v, position, id);\r
-\r
- Object o = this.getListAdapter().getItem(position);\r
- String keyword = o.toString();\r
-\r
- Intent intent = null;\r
- if (keyword.equals(items[0])) intent = new Intent(this, LifeCycleTest.class);\r
- if (keyword.equals(items[1])) intent = new Intent(this, SimpleTest.class);\r
- if (keyword.equals(items[2])) intent = new Intent(this, VertexArrayTest.class);\r
- if (keyword.equals(items[3])) intent = new Intent(this, VertexBufferObjectTest.class);\r
- if (keyword.equals(items[4])) intent = new Intent(this, MeshRendererTest.class);\r
- if (keyword.equals(items[5])) intent = new Intent(this, FixedPointMeshRendererTest.class);\r
- if (keyword.equals(items[6])) intent = new Intent(this, ManagedTest.class);\r
- if (keyword.equals(items[7])) intent = new Intent(this, TextTest.class);\r
- if (keyword.equals(items[8])) intent = new Intent(this, SoundTest.class);\r
- if (keyword.equals(items[9])) intent = new Intent(this, InputTest.class);\r
- if (keyword.equals(items[10])) intent = new Intent(this, ObjTest.class);\r
- if (keyword.equals(items[11])) intent = new Intent(this, FixedPointTest.class);\r
- if (keyword.equals(items[12])) intent = new Intent(this, FloatTest.class);\r
- if (keyword.equals(items[13])) intent = new Intent(this, LagTest.class);\r
- if (keyword.equals(items[14])) intent = new Intent(this, Pong.class);\r
- if (keyword.equals(items[15])) intent = new Intent(this, AudioDeviceTest.class);\r
- if (keyword.equals(items[16])) intent = new Intent(this, Mpg123Test.class);\r
- if (keyword.equals(items[17])) intent = new Intent(this, VorbisTest.class);\r
- if (keyword.equals(items[18])) intent = new Intent(this, PerformanceTest.class);\r
- if (keyword.equals(items[19])) intent = new Intent(this, MeshShaderTest.class);\r
- if (keyword.equals(items[20])) intent = new Intent(this, SpriteBatchTest.class);\r
- if (keyword.equals(items[21])) intent = new Intent(this, SpriteBatchShaderTest.class);\r
- if (keyword.equals(items[22])) intent = new Intent(this, FrameBufferTest.class);\r
- if (keyword.equals(items[23])) intent = new Intent(this, SpriteBatchRotationTest.class);\r
- if (keyword.equals(items[24])) intent = new Intent(this, Box2DTest.class);\r
- if (keyword.equals(items[25])) intent = new Intent(this, AudioRecorderTest.class);\r
- if (keyword.equals(items[26])) intent = new Intent(this, TestCollection.class);\r
- if (keyword.equals(items[27])) intent = new Intent(this, ResourcesTest.class);\r
- if (keyword.equals(items[28])) intent = new Intent(this, MD5Test.class);\r
- if (keyword.equals(items[29])) intent = new Intent(this, MicroBenchmarks.class);\r
- if (keyword.equals(items[30])) intent = new Intent(this, MultitouchTest.class);\r
- if (keyword.equals(items[31])) intent = new Intent(this, BufferUtilsTest.class);\r
- if (keyword.equals(items[32])) intent = new Intent(this, TerrainTest.class);\r
- if (keyword.equals(items[33])) intent = new Intent(this, WaterRipples.class);\r
- if (keyword.equals(items[34])) intent = new Intent(this, StageTest.class);\r
- if (keyword.equals(items[35])) intent = new Intent(this, WindowedTest.class);\r
- if (keyword.equals(items[36])) intent = new Intent(this, FillrateTest.class);\r
- if (keyword.equals(items[37])) intent = new Intent(this, AlphaTest.class);\r
- if (keyword.equals(items[38])) intent = new Intent(this, BitmapFontTest.class);\r
- if (keyword.equals(items[39])) intent = new Intent(this, BitmapFontFlipTest.class);\r
-\r
- startActivity(intent);\r
- }\r
-\r
-}\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import java.nio.ByteBuffer;\r
import java.nio.ByteOrder;\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
--- /dev/null
+/*******************************************************************************\r
+ * Copyright 2010 mzechner\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the\r
+ * License. You may obtain a copy of the License at\r
+ * \r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"\r
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language\r
+ * governing permissions and limitations under the License.\r
+ ******************************************************************************/\r
+\r
+package com.badlogic.gdx.tests.android;\r
+\r
+import android.app.ListActivity;\r
+import android.content.Intent;\r
+import android.os.Bundle;\r
+import android.view.View;\r
+import android.widget.ArrayAdapter;\r
+import android.widget.ListView;\r
+\r
+import com.badlogic.gdx.box2d.TestCollection;\r
+import com.badlogic.gdx.tests.utils.GdxTests;\r
+\r
+public class GDXTester extends ListActivity {\r
+\r
+ @Override public void onCreate (Bundle savedInstanceState) {\r
+ super.onCreate(savedInstanceState);\r
+ setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, GdxTests.getNames()));\r
+ }\r
+\r
+ protected void onListItemClick (ListView l, View v, int position, long id) {\r
+ super.onListItemClick(l, v, position, id);\r
+\r
+ Object o = this.getListAdapter().getItem(position);\r
+ String testName = o.toString();\r
+\r
+ Bundle bundle = new Bundle();\r
+ bundle.putString("test", testName);\r
+ Intent intent = new Intent(this,GdxTestActivity.class);\r
+ intent.putExtras(bundle);\r
+ \r
+\r
+ startActivity(intent);\r
+ }\r
+\r
+}\r
--- /dev/null
+\r
+package com.badlogic.gdx.tests.android;\r
+\r
+import android.os.Bundle;\r
+\r
+import com.badlogic.gdx.backends.android.AndroidApplication;\r
+import com.badlogic.gdx.tests.utils.GdxTest;\r
+import com.badlogic.gdx.tests.utils.GdxTests;\r
+\r
+public class GdxTestActivity extends AndroidApplication {\r
+\r
+ public void onCreate (Bundle bundle) {\r
+ super.onCreate(bundle);\r
+ \r
+ Bundle extras = getIntent().getExtras();\r
+ String testName = (String)extras.get("test");\r
+ \r
+ GdxTest test = GdxTests.newTest(testName);\r
+ initialize(test.needsGL20());\r
+ getGraphics().setRenderListener(test);\r
+ }\r
+}\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import javax.microedition.khronos.egl.EGLConfig;\r
import javax.microedition.khronos.opengles.GL10;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.content.pm.ActivityInfo;\r
import android.os.Bundle;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import java.nio.ByteBuffer;\r
import java.nio.ByteOrder;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
+import com.badlogic.gdx.Gdx;\r
+import com.badlogic.gdx.RenderListener;\r
import com.badlogic.gdx.backends.android.AndroidApplication;\r
import com.badlogic.gdx.graphics.Font;\r
import com.badlogic.gdx.graphics.Font.FontStyle;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.content.pm.ActivityInfo;\r
import android.os.Bundle;\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
* governing permissions and limitations under the License.\r
******************************************************************************/\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import android.os.Bundle;\r
\r
\r
-package com.badlogic.gdx;\r
+package com.badlogic.gdx.tests.android;\r
\r
import javax.microedition.khronos.opengles.GL10;\r
\r
import android.widget.Button;\r
import android.widget.LinearLayout;\r
\r
+import com.badlogic.gdx.Gdx;\r
+import com.badlogic.gdx.RenderListener;\r
import com.badlogic.gdx.backends.android.AndroidApplication;\r
import com.badlogic.gdx.graphics.Color;\r
\r