You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/03/30 21:24:14 UTC

[GitHub] [cordova-android] distinctdan opened a new issue #704: edit-config isn't working when setting "android:screenOrientation"

distinctdan opened a new issue #704: edit-config isn't working when setting "android:screenOrientation"
URL: https://github.com/apache/cordova-android/issues/704
 
 
   # Bug Report
   I'm trying to set the orientation of my tilt-based app to be only landscape (and not reverse-landscape. Cordova unfortunately doesn't support this out of the box, so I'm using an edit config to edit the AndroidManifest.xml. However, it isn't working. It adds an `edit-config` entry under `res/xml/config.xml`, but it doesn't actually change `AndroidManifest.xml`. I'm not sure if it's supposed to or not. Regardless, when I run my app, it's still in portrait mode.
   
   Here is my main config.xml for the edit-config:
   ```
   <platform name="android">
           
       <edit-config file="AndroidManifest.xml"
                    target="/manifest/application/activity[@android:name='MainActivity']"
                    mode="merge">
           <activity android:screenOrientation="landscape"></activity>
       </edit-config>
   </platform>
   ```
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   Cordova CLI: 9.0.0
   Cordova-android: 8.0.0
   Cordova-ios: 5.0.0
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org