1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-05-07 10:23:53 +02: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;
using Android.Content.PM; using Android.Content.PM;
using Android.OS; using Android.OS;
@ -47,10 +48,10 @@ public class Activity1 : AndroidGameActivity {
base.OnWindowFocusChanged(hasFocus); base.OnWindowFocusChanged(hasFocus);
// hide the status bar // hide the status bar
if (hasFocus) { if (hasFocus) {
#pragma warning disable CS0618 #pragma warning disable CS0618
// TODO this is deprecated, find out how to replace it // 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); 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"?> <?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"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="31" /> <application android:label="MLEM Android Demos"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true" /> <uses-permission android:name="android.permission.INTERNET" />
<application android:label="MLEM Android Demos" />
</manifest> </manifest>

View file

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

View file

@ -242,7 +242,10 @@ namespace Demos {
this.root.AddChild(new VerticalSpace(3)); 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 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)); 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"))) using (var reader = new StreamReader(TitleContainer.OpenStream("Content/Markdown.md")))
parser.ParseInto(reader.ReadToEnd(), this.root); parser.ParseInto(reader.ReadToEnd(), this.root);