I wonder how can I display the same design when I turn the view to landscape view can anyone help me with this. I tried this code but it didn't do anything
the manifest
android:configChanges="keyboardHidden|orientation"
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
// Checks the orientation of the screen
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
Toast.makeText(this, "landscape", Toast.LENGTH_SHORT).show();
} else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
Toast.makeText(this, "portrait", Toast.LENGTH_SHORT).show();
}
}
@Override
public void setContentView(int layoutResID)
{
super.setContentView(layoutResID);
}