Search code examples
androidtransitiontabactivityactivitygroup

overridePendingTransition() is not working in TabActivity


I am using TabActivity for my application. It has 4 tabs.

Tab 1 is a ActivityGroup. It has many child activities. I used overridePendingTransition() to have a transition between activities. But, it does not work for TabActivity. Also i added overridePendingTransition() in onPause() method of TabActivity. But No use.

Can somebody help me out..

Thanks in advance.


Solution

  • Without code you can't say much how to solve, but im sure the problem is, that you don't call overridePendingTransition right after starting the new activity. Yes, RIGHT after starting the activity. Otherwise it will not affect.

    So something like this would work like a charm

    startActivity(new Intent(this, Blub.class));
    // don't do anything else between those 2 calls
    overridePendingTransistion(R.anim.enter, R.anim.exit);