Skip to content

Commit

Permalink
Don't crash the app if not an activity
Browse files Browse the repository at this point in the history
  • Loading branch information
Frosty-J committed Sep 24, 2024
1 parent d52faea commit 30a7b42
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import com.badlogic.gdx.backends.android.AndroidFragmentApplication;
import com.badlogic.gdx.tests.BackTest;
import com.badlogic.gdx.tests.utils.GdxTest;
import com.badlogic.gdx.tests.utils.GdxTests;

Expand All @@ -33,6 +34,8 @@ public class FragmentTestStarter extends FragmentActivity implements AndroidFrag
protected void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GdxTests.tests.add(MatrixTest.class);
if (!GdxTests.tests.contains(MatrixTest.class)) GdxTests.tests.add(MatrixTest.class);
if (!GdxTests.tests.contains(BackTest.class)) GdxTests.tests.add(BackTest.class);

LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.HORIZONTAL);
Expand Down

0 comments on commit 30a7b42

Please # to comment.