I have an app that uses the below sdk in the manifest:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
To prevent the activity from restarting on screen rotation I add to manifest :
android:configChanges="orientation|keyboardHidden|screenSize"
Do I need to override the onConfigurationChanged
in activity itself also, as below:
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
setContentView(R.layout.myLayout);
}
or is this line in the manifest is enough:
android:configChanges="orientation|keyboardHidden|screenSize"
Any help will be appreciated.