fix crash victoire

This commit is contained in:
marc barbier
2021-01-10 22:53:50 +01:00
parent bead53795d
commit 8582021ca4
3 changed files with 6 additions and 6 deletions
+3 -2
View File
@@ -16,7 +16,6 @@
<activity android:name=".Credit"></activity>
<activity
android:name=".MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -26,7 +25,9 @@
</activity>
<activity
android:name=".GameActivity"
android:screenOrientation="landscape">
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="landscape"
android:keepScreenOn="true">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
@@ -33,7 +33,7 @@ public class PopupRunable implements Runnable{
public static void makePopup(Activity activity,int stringId)
{
String recivedMessage = activity.getResources().getString(stringId);
new PopupRunable(activity,recivedMessage).run();
activity.runOnUiThread(new PopupRunable(activity,recivedMessage));
}
/**
@@ -43,6 +43,6 @@ public class PopupRunable implements Runnable{
*/
public static void makePopup(Activity activity,String message)
{
new PopupRunable(activity,message).run();
activity.runOnUiThread(new PopupRunable(activity,message));
}
}
@@ -41,13 +41,12 @@ public class GameActivity extends Activity {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
}
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
String deck = getIntent().getStringExtra("DECK");
renderer = new Renderer(getBaseContext(),deck,this);
setContentView(renderer);
}