Check out example codes for "how to get orientation lock to portrait android stackoverflow". It will help you in understanding the concepts better.

Code Example 1

<activity
            android:name="com.example.demo_spinner.MainActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>

Learn ReactJs, React Native from akashmittal.com