ActionBarSherlock
ActionBarSherlock copied to clipboard
removeAllTabs() triggers onTabUnselected(), but does not commit the fragment transaction.
(See title) Platform tested was android 4.1.2 and actionbarsherlock 4.2.0: I've setup a simple activity with 2 tabs and a TabListener, which adds/removes the fragments onTabSelected and onTabUnselected. switching between those two tabs works fine, the fragment associated with the unselected tab gets properly paused, stopped, destroyed etc. When using getSupportActionBar().removeAllTabs() however, the onTabUnselected gets called, i remove the fragment using the given fragment transaction (as before), but the transaction never gets committed.
semi-wild guess of mine: since ActionBarSherlock is using the native implementation when possible, but the SupportFragmentManager doesn't. ActionBarWrapper just calls the native removeAllTabs(), which uses the native Fragment Manager.
P.S. same scenario using the native actionbar instead works as expected.
I have the same issue. The FragmentTransaction seems to be commited between each tab change, but not after the call of getSupportActionBar().removeAllTabs().
After some investigations, it seems that the custom implementation of the ActionBar commits the fragment transaction, but not the native one.
Have you found at least a workaround for this? I'm getting overlapping fragments all over the place because of this... :(
(Thanks!)
I have replicated the issue with the 4.3.1