This video shows the code to set the default orientation to Landscape in your Android App.
I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: programmerworld1990@gmail.com
Complete source code and other details:
package com.programmerworld.landscapevsportraitorientation;
import androidx.appcompat.app.AppCompatActivity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
}
}
Screenshots:
Click on Extended Controls button for device control window:
Device Extended control window:
Excerpt:
This video demonstrates how to set the default orientation to Landscape in an Android App. The source code includes the necessary package, imports, and class details. The method for setting the orientation is explained within the content, with a request to contact for any queries or feedback. The provided link redirects to a contact page, and an email address is also given. Additionally, screenshots of device control windows are included. For further details, refer to the provided YouTube link.