Set Orientation for the Android app using Capacitor only. i.e. no Cordova plugin #4377
Answered
by
jcesarmobile
Sampath-Lokuge
asked this question in
Q&A
-
Hi, Can you tell me how to do this with the Android app? i.e. using Capacitor to set the orientation for the whole app once. |
Beta Was this translation helpful? Give feedback.
Answered by
jcesarmobile
Mar 22, 2021
Replies: 1 comment 1 reply
-
In Android apps you can't set the orientation for the whole app, but for the activities in your app. But since Capacitor has a single activity you can configure it's orientation by adding this to the
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Sampath-Lokuge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Android apps you can't set the orientation for the whole app, but for the activities in your app.
But since Capacitor has a single activity you can configure it's orientation by adding this to the
activity
tag inAndroidManifest.xml
android:screenOrientation="portrait"
(replace portrait with the desired orientation)