0

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.

DroidDev
  • 1,527
  • 4
  • 20
  • 42
Sravanya
  • 59
  • 7
  • Try this: http://stackoverflow.com/questions/13848500/replace-layout-on-orientation-change – Mdlc Dec 04 '13 at 13:45
  • 2
    possible duplicate of [Save activity state(not just some variables) on orientation change](http://stackoverflow.com/questions/8542560/save-activity-statenot-just-some-variables-on-orientation-change) – 2Dee Dec 04 '13 at 13:49

0 Answers0