i'm doing orientation change from portrait to landscape and from landscape to portrait. My code as below
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
//Set titlebar as "my@heaven"
getSherlockActivity().getSupportActionBar()
.setBackgroundDrawable(getResources().getDrawable(R.drawable.myheaven));
view = inflater.inflate(R.layout.memorial_listing, container, false);
setUpView(savedInstanceState);
return view;
}
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
// Checks the orientation of the screen
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
} else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT){
}
}
and i also add this to manifest
android:configChanges="orientation|keyboardHidden|screenSize"
and the same layout i put inside layout folder for portrait and layout-land for landscape but when i try to rotate the screen if start from portrait then still remain getting layout from layout folder. The screen rotate but not getting right folder to display the layout. Please help