I have successfully changed the transitions between activities using overridePendingTransition()
.
Unfortunately when I am on a TabActivity
I had a similar problem with calling overridePendingTransition() from within a Fragment, because Fragments do not have overridePendingTransition() method defined.
I solved it using:
getActivity().overridePendingTransition(R.anim.enterAnim, R.anim.exitAnim);
Hope it helps. The Fragment was within a TabHost.
I found out that the problem was because my view was a sub-activity inside a tab.
To correctly override the transitions I've overridden the onPause
method on the TabActivity
and it now works as expected.
Note: You still have to use the overridePendingTransition()
on the listener for your items if your activity is NOT within a tab.