How do I make sure my app is only for vertical layout?
I have tried android:screenOrientation=\"portrait\"
but that doesn\'t seem to do the trick.
Activity is to block just in case want to block all and only repeat this line of code in their Activitys.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my);
// Here, talk to the java does not want that the user can rotate their activity.
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
or open your "AndroidManisfest.xml" and add the rows for the portrait mode as shown below.
android:configChanges="orientation"
android:screenOrientation="portrait">