I try to prevent that onCreate() is called when rotating the device. To reach this goal I followed the documentation and added
<activity android:name=".TabActivity"
android:label="@string/app_name"
android:configChanges="orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
to the manifest. After that I inserted this to the Activity's source code:
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
But it seems like Android ignores this method. A breakpoint which I set here is never reached.
What's my fault here? Is this a problem when using tabs?
Regards!
Try this:
android:configChanges="orientation|keyboardHidden"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With