openfl / lime

A foundational Haxe framework for cross-platform development
https://lime.openfl.org/
MIT License
754 stars 371 forks source link

Make it easier to configure AndroidManifest.xml from project.xml. #1735

Closed player-03 closed 8 months ago

player-03 commented 9 months ago

These changes allow the user to configure their <application /> and <activity /> tags without ever leaving project.xml.

<config:android>
    <application android:appCategory="game" android:supportsRtl="true" />
    <activity android:immersive="false" />
    <activity android:persistableMode="persistAcrossReboots" />
</config:android>

<config:android>
    <!-- If an attribute is repeated, it will overwrite the old value. -->
    <activity android:persistableMode="persistNever" />

    <!-- Passing an empty string removes that attribute. -->
    <application android:appCategory="" />

    <!-- It's even possible to override Lime's defaults. -->
    <application android:theme="@android:style/Theme.Fullscreen" />
</config:android>

Previously, the user would have needed to make a template and then maintain that template indefinitely. Now, they can change the one thing they need and leave the maintenance to Lime.

player-03 commented 8 months ago

Note to self: remember to add documentation when this gets closer to release.

Update: draft pull request created.