Skip to content

Commit 93759f3

Browse files
authored
Merge pull request kivy#1256 from SomberNight/manifest_set_launchMode
allow setting launchMode for the main activity in the manifest
2 parents cbad638 + 7bddbba commit 93759f3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

pythonforandroid/bootstraps/sdl2/build/build.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ def make_package(args):
297297

298298
args.add_activity = args.add_activity or []
299299

300+
args.activity_launch_mode = args.activity_launch_mode or ''
301+
300302
if args.extra_source_dirs:
301303
esd = []
302304
for spec in args.extra_source_dirs:
@@ -514,6 +516,8 @@ def parse_args(args=None):
514516
'the appropriate environment variables.'))
515517
ap.add_argument('--add-activity', dest='add_activity', action='append',
516518
help='Add this Java class as an Activity to the manifest.')
519+
ap.add_argument('--activity-launch-mode', dest='activity_launch_mode',
520+
help='Set the launch mode of the main activity in the manifest.')
517521

518522
if args is None:
519523
args = sys.argv[1:]

pythonforandroid/bootstraps/sdl2/build/templates/AndroidManifest.tmpl.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
android:label="@string/app_name"
6666
android:configChanges="keyboardHidden|orientation{% if args.min_sdk_version >= 13 %}|screenSize{% endif %}"
6767
android:screenOrientation="{{ args.orientation }}"
68+
{% if args.activity_launch_mode %}
69+
android:launchMode="{{ args.activity_launch_mode }}"
70+
{% endif %}
6871
>
6972

7073
{% if args.launcher %}

0 commit comments

Comments
 (0)