Skip to content

Commit 7547632

Browse files
committed
option for apptheme
1 parent c262fec commit 7547632

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

pythonforandroid/bootstraps/common/build/build.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -666,9 +666,12 @@ def parse_args(args=None):
666666
'topics/manifest/'
667667
'activity-element.html'))
668668

669-
ap.add_argument('--entrypoint', dest='entrypoint',
670-
default='org.kivy.android.PythonActivity',
671-
help='defines which java class sill be used for startup, usually a subclass of PythonActivity')
669+
ap.add_argument('--android-entrypoint', dest='android_entrypoint',
670+
default='org.kivy.android.PythonActivity',
671+
help='defines which java class sill be used for startup, usually a subclass of PythonActivity')
672+
ap.add_argument('--android-apptheme', dest='android_apptheme',
673+
default='@android:style/Theme.NoTitleBar',
674+
help='defines which app theme should be selected for the main activity')
672675
ap.add_argument('--wakelock', dest='wakelock', action='store_true',
673676
help=('Indicate if the application needs the device '
674677
'to stay on'))

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<application android:label="@string/app_name"
5555
android:icon="@drawable/icon"
5656
android:allowBackup="{{ args.allow_backup }}"
57-
android:theme="@android:style/Theme.NoTitleBar{% if not args.window %}.Fullscreen{% endif %}"
57+
android:theme="{{args.android_apptheme}}{% if not args.window %}.Fullscreen{% endif %}"
5858
android:hardwareAccelerated="true" >
5959
{% for l in args.android_used_libs %}
6060
<uses-library android:name="{{ l }}" />
@@ -64,7 +64,7 @@
6464
<meta-data android:name="{{ m.split('=', 1)[0] }}" android:value="{{ m.split('=', 1)[-1] }}"/>{% endfor %}
6565
<meta-data android:name="wakelock" android:value="{% if args.wakelock %}1{% else %}0{% endif %}"/>
6666

67-
<activity android:name="{{args.entrypoint}}"
67+
<activity android:name="{{args.android_entrypoint}}"
6868
android:label="@string/app_name"
6969
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|fontScale|uiMode{% if args.min_sdk_version >= 8 %}|uiMode{% endif %}{% if args.min_sdk_version >= 13 %}|screenSize|smallestScreenSize{% endif %}{% if args.min_sdk_version >= 17 %}|layoutDirection{% endif %}{% if args.min_sdk_version >= 24 %}|density{% endif %}"
7070
android:screenOrientation="{{ args.orientation }}"

0 commit comments

Comments
 (0)