[DEPRECATED] Action bar implementation which uses the native action bar on Android 4.0+ and a custom implementation on pre-4.0 through a single API and theme.
the issue don't reproduce on any otyher device I got, including GT-S583i 2.3.6 or terminal with 4.x
My app got one activity and various fragment. (the Navigation change the current fragment)
Manifest:
- I do NOT use "android:configChanges=" in the manifest
<application
android:theme="@style/Theme.Sherlock.Light" >
<activity
android:name=".MainActivity"
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Code:
public class MainActivity extends SherlockFragmentActivity {
/**called by the onResume of the fragment.*/
public void onCurrentFragmentChange(BaseDelegate currentFrag){
// depending the fragment/terminal, the activity may rotate or not.
setRequestedOrientation(currentFrag.getRequestedScreenOrientation());
actionbar_loadNavigationList(currentFrag); // call _mActionBar.setListNavigationCallbacks(null or adapter)
updateActionBar(currentFrag, currentFrag.isOrientationLandscape()); // call _mActionBar.setNavigationMode(list for portrait, none for landscape); invalidateOptionsMenu() and _mActionBar.setTitle()
}
Steps:
Observed :
expected:
Workaround tested:
Config:
Manifest:
Code: