I have a activity in which there is a spinner. since for portrait and landscape mode i have different layout so I am changing layout in onConfigurationChanged
method
@Override
public void onConfigurationChanged(Configuration conf) {
super.onConfigurationChanged(conf);
setContentView(R.layout.layout);
initUI();
}
but the problem is when I change orientation , my spinner is recreated so if spinner is open in portrait mode it get close in landscape mode.My requirement is : if it is open in any mode , it should be open after orientation change.can you please let me know how to handle this situation.