I want my application by changing the orientation it load the layouts from layout and layout-land folder. and also does not refresh the content.
I searched in google. I got the below solutions but it does not work for me.
In my app i created layout(default),layout-land. for portrait and landscape of mobile. when i changed the orientation they loaded perfectly but the layout content is refreshed.
i put the android:configChanges="orientation|screenSize"
in manifest file
in landscape mode it does not refresh the values, but it does not load the layout from layout-land folder. the layout load from the layout folder.
in Manifest i put this
android:configChanges="keyboardHidden|orientation"
in my java class
public void InitializeUI(){
this.textView = (TextView) this.findViewById(R.id.textView1); }
@Override public void onConfigurationChanged(Configuration newConfig){
super.onConfigurationChanged(newConfig);
setContentView(R.layout.sample);
InitializeUI();}
it is also refresh the whole content.
i am struck here, please help me if anybody come across this.
Thanks in advance.