using both layout-land and onConfigurationChanged()
- by joe
I just want to change Layout when the device has been rotated. but I've found that onConfigurationChanged() must call onCreate() again using setContentView with separated
layout named of *_land.xml
if(getActivity().getWindowManager().getDefaultDisplay().
getRotation() == Surface.ROTATION_0)
view = inflater.inflate(R.layout.fragment_layout, null);
else view = inflater.inflate(R.layout.fragment_layout_land, null);
Project is too big and there are many codes to fix If onCreate again without finish().
I'd like somebody help this.
Thank you.
- onConfigurationChanged concept is keep layout I think