So I wanted to see how my project looks like when in landscape and for sure i didnt like the appearance. I was wondering how can i make my project stay on portrait? I will appreciate any help.
android.app.FragmentManager myFragment = getFragmentManager();
FragmentTransaction fragmentTransaction = myFragment.beginTransaction();
Configuration configInfo = getResources().getConfiguration();
if(configInfo.orientation ==Configuration.ORIENTATION_LANDSCAPE){
FragmentLandscape lScape = new FragmentLandscape();
fragmentTransaction.replace(android.R.id.content,lScape);
}else{
FragmentPortrait lportrait = new FragmentPortrait();
fragmentTransaction.replace(android.R.id.content,lportrait);
}
fragmentTransaction.commit();