diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 13405ba012..08422736a2 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -14,6 +14,7 @@ android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:isGame="true" + android:theme="@style/ArcTheme" android:usesCleartextTraffic="true" android:appCategory="game" android:label="@string/app_name" diff --git a/android/res/values-v21/styles.xml b/android/res/values-v21/styles.xml new file mode 100644 index 0000000000..9ddd5ffb6c --- /dev/null +++ b/android/res/values-v21/styles.xml @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/android/res/values/styles.xml b/android/res/values/styles.xml new file mode 100644 index 0000000000..ac57c806dd --- /dev/null +++ b/android/res/values/styles.xml @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index 1380251730..715e340ed3 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -86,7 +86,8 @@ public class Mods implements Loadable{ /** Imports an external mod file. Folders are not supported here. */ public LoadedMod importMod(Fi file) throws IOException{ - String baseName = file.nameWithoutExtension(); + //for some reason, android likes to add colons to file names, e.g. primary:ExampleJavaMod.jar, which breaks dexing + String baseName = file.nameWithoutExtension().replace(':', '_'); String finalName = baseName; //find a name to prevent any name conflicts int count = 1; @@ -300,12 +301,12 @@ public class Mods implements Loadable{ } private PageType getPage(Fi file){ - String parent = file.parent().name(); + String path = file.path(); return - parent.equals("environment") ? PageType.environment : - parent.equals("editor") ? PageType.editor : - parent.equals("rubble") ? PageType.editor : - parent.equals("ui") || file.parent().parent().name().equals("ui") ? PageType.ui : + path.contains("sprites/environment") ? PageType.environment : + path.contains("sprites/editor") ? PageType.editor : + path.contains("sprites/rubble") ? PageType.editor : + path.contains("sprites/ui") ? PageType.ui : PageType.main; }