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!
onCreate()
to determine whether it is executed again (it should not as you said) when you switch your device's orientation? – Bacchanal