android:screenOrientation="portrait"
<!-- inside of your AndroidManifest.xml -->
<activity android:name=".MainActivity"
android:screenOrientation="portrait"/>
<activity
...
...
android:screenOrientation="nosensor">
android:screenOrientation="portrait or landscape"