Skip to content

Commit fac0ee9

Browse files
committed
Improved documentation for --orientation option
1 parent 3b46f2c commit fac0ee9

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

doc/source/buildoptions.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,12 @@ options (this list may not be exhaustive):
8888
- ``--package``: The Java package name for your project. Choose e.g. ``org.example.yourapp``.
8989
- ``--name``: The app name.
9090
- ``--version``: The version number.
91-
- ``--orientation``: One of ``portait``, ``landscape`` or ``sensor``
92-
to automatically rotate according to the device orientation.
91+
- ``--orientation``: Usually one of ``portait``, ``landscape``,
92+
``sensor`` to automatically rotate according to the device
93+
orientation, or ``user`` to do the same but obeying the user's
94+
settings. The full list of valid options is given under
95+
``android:screenOrientation`` in the `Android documentation
96+
<https://developer.android.com/guide/topics/manifest/activity-element.html>`__.
9397
- ``--icon``: A path to the png file to use as the application icon.
9498
- ``-- permission``: A permission name for the app,
9599
e.g. ``--permission VIBRATE``. For multiple permissions, add
@@ -144,8 +148,12 @@ ready.
144148
- ``--package``: The Java package name for your project. Choose e.g. ``org.example.yourapp``.
145149
- ``--name``: The app name.
146150
- ``--version``: The version number.
147-
- ``--orientation``: One of ``portait``, ``landscape`` or ``sensor``
148-
to automatically rotate according to the device orientation.
151+
- ``--orientation``: Usually one of ``portait``, ``landscape``,
152+
``sensor`` to automatically rotate according to the device
153+
orientation, or ``user`` to do the same but obeying the user's
154+
settings. The full list of valid options is given under
155+
``android:screenOrientation`` in the `Android documentation
156+
<https://developer.android.com/guide/topics/manifest/activity-element.html>`__.
149157
- ``--icon``: A path to the png file to use as the application icon.
150158
- ``-- permission``: A permission name for the app,
151159
e.g. ``--permission VIBRATE``. For multiple permissions, add

pythonforandroid/bootstraps/sdl2/build/build.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,13 @@ def parse_args(args=None):
412412
required=True)
413413
ap.add_argument('--orientation', dest='orientation', default='portrait',
414414
help=('The orientation that the game will display in. '
415-
'Usually one of "landscape", "portrait" or '
416-
'"sensor"'))
415+
'Usually one of "landscape", "portrait", '
416+
'"sensor", or "user" (the same as "sensor" but '
417+
'obeying the user\'s Android rotation setting). '
418+
'The full list of options is given under '
419+
'android_screenOrientation at '
420+
'https://developer.android.com/guide/topics/manifest/'
421+
'activity-element.html'))
417422
ap.add_argument('--icon', dest='icon',
418423
help='A png file to use as the icon for the application.')
419424
ap.add_argument('--permission', dest='permissions', action='append',

testapps/setup_testapp_python2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
'dist-name': 'bdisttest',
1010
'ndk-version': '10.3.2',
1111
'permission': 'VIBRATE',
12+
'window': None,
1213
}}
1314

1415
package_data = {'': ['*.py',

0 commit comments

Comments
 (0)