1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-25 09:49:23 +01:00

fixed issues in the android demo's release mode

This commit is contained in:
Ell 2023-03-04 12:10:16 +01:00
parent 7a54e4aa2d
commit 5c8b535fe4
4 changed files with 13 additions and 10 deletions

View file

@ -1,3 +1,4 @@
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.OS;
@ -47,10 +48,10 @@ public class Activity1 : AndroidGameActivity {
base.OnWindowFocusChanged(hasFocus);
// hide the status bar
if (hasFocus) {
#pragma warning disable CS0618
#pragma warning disable CS0618
// TODO this is deprecated, find out how to replace it
this.Window.DecorView.SystemUiVisibility = (StatusBarVisibility) (SystemUiFlags.ImmersiveSticky | SystemUiFlags.LayoutStable | SystemUiFlags.LayoutHideNavigation | SystemUiFlags.LayoutFullscreen | SystemUiFlags.HideNavigation | SystemUiFlags.Fullscreen);
#pragma warning restore CS0618
#pragma warning restore CS0618
}
}

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="de.ellpeck.mlem.demos.android" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="31" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<application android:label="MLEM Android Demos" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:label="MLEM Android Demos"/>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

View file

@ -4,9 +4,9 @@
<SupportedOSPlatformVersion>31</SupportedOSPlatformVersion>
<OutputType>Exe</OutputType>
<ApplicationId>de.ellpeck.mlem.demos.android</ApplicationId>
<ApplicationVersion>1</ApplicationVersion>
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ImplicitUsings>true</ImplicitUsings>
<ApplicationVersion>100</ApplicationVersion>
<ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion>
<PublishTrimmed>false</PublishTrimmed>
<IsPackable>false</IsPackable>
</PropertyGroup>

View file

@ -242,7 +242,10 @@ namespace Demos {
this.root.AddChild(new VerticalSpace(3));
this.root.AddChild(new Paragraph(Anchor.AutoLeft, 1, "MLEM.Ui also contains a simple Markdown parser, which can be useful for displaying things like changelogs in your game."));
this.root.AddChild(new VerticalSpace(3));
var parser = new UiMarkdownParser {GraphicsDevice = this.GraphicsDevice};
var parser = new UiMarkdownParser {
GraphicsDevice = this.GraphicsDevice,
ImageExceptionHandler = (s, e) => Console.Error.WriteLine($"Couldn't load image {s}: {e}")
};
using (var reader = new StreamReader(TitleContainer.OpenStream("Content/Markdown.md")))
parser.ParseInto(reader.ReadToEnd(), this.root);