Article sections

    By default, the app orientation is portrait and auto-rotate is not enabled.

    However, it is simple to change this. Please use the following steps:

    1. Open the Android WebViewGold codebase
    2. Go to app > manifests > AndroidManifest.xml
    3. In this file, search for android:name=”webviewgold.myappname.MainActivity” (you can use Command-F to bring up the search feature). This will bring you to the appropriate <activity>.
    4. Just add the attribute android:screenOrientation=”sensor” (for auto rotate) or android:screenOrientation=”landscape” (for landscape only).
    5. Re-run your app

    Please see the screenshot below for an example 🙂

     

    custom-orientation

    in WebViewGold for Android