I have looked at questions related to my problem on SO but couldn\'t figure out what the problem is. Bear with me if this is a repost.
Here is what i am looking for:
Change the code,
if ((findViewById(R.id.fragment_container) != null)
&& (findViewById(R.id.detail_fragment_container) != null)) {
mTwoPane = true;
} else {
mTwoPane = false;
}
by
if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE){
//Do some stuff
mTwoPane = true;
} else{
mTwoPane = false;
}
hope it will help you