mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Android launcher now Kotlin, app should be recognized as Game
This commit is contained in:
parent
2da7c5be8f
commit
8bdad4c38d
@ -10,6 +10,7 @@
|
|||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/uncivicon2"
|
android:icon="@drawable/uncivicon2"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
android:isGame="true"
|
||||||
android:theme="@style/GdxTheme" >
|
android:theme="@style/GdxTheme" >
|
||||||
<activity
|
<activity
|
||||||
android:name="com.unciv.app.AndroidLauncher"
|
android:name="com.unciv.app.AndroidLauncher"
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
package com.unciv.app;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
|
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplication;
|
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
|
||||||
import com.unciv.UncivGame;
|
|
||||||
|
|
||||||
public class AndroidLauncher extends AndroidApplication {
|
|
||||||
@Override
|
|
||||||
protected void onCreate (Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
|
|
||||||
String version = BuildConfig.VERSION_NAME;
|
|
||||||
|
|
||||||
config.useImmersiveMode=true;
|
|
||||||
|
|
||||||
initialize(new UncivGame(version), config);
|
|
||||||
}
|
|
||||||
}
|
|
16
android/src/com/unciv/app/AndroidLauncher.kt
Normal file
16
android/src/com/unciv/app/AndroidLauncher.kt
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package com.unciv.app
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.badlogic.gdx.backends.android.AndroidApplication
|
||||||
|
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration
|
||||||
|
import com.unciv.UncivGame
|
||||||
|
|
||||||
|
class AndroidLauncher : AndroidApplication() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
val config = AndroidApplicationConfiguration()
|
||||||
|
val version = BuildConfig.VERSION_NAME
|
||||||
|
config.useImmersiveMode = true
|
||||||
|
initialize(UncivGame(version), config)
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user