1

Is there any way by which I can add custom animations during the switch over from one tab to another in a TabAcivity?

devanshu_kaushik
  • 929
  • 11
  • 30

1 Answers1

0

Short answer, YES. But without seeing your code it's hard to help with your specific issue. Depending on where you're trying to launch the animation from and if it will be the same for each tab, you could either kick it off from the TabActivity or from each of your tab's children Activities. I'd say, the easiest thing to do would be to kick it off from the onResume() of each of the tab's activities. If you put it in the onCreate() it would only launch the first time each tab is selected.

SBerg413
  • 14,515
  • 6
  • 62
  • 88
  • By this, do you mean using overridePendingTransition() in the onResume() of each child activity? – devanshu_kaushik Oct 10 '11 at 12:32
  • No. I just mean to create an animation via your animation.xml and graphics like you normally wood for any activity and kick it off in your child activities. But, like I said, not sure where you want this animation to appear, so hard to give specific advice. – SBerg413 Oct 10 '11 at 14:31
  • Umm... by default the tab activity has no aimation when you switch between different tabs, so I want to add a custom animation during the switch, I have created the xml and it works well with other activities in the project (i used overridePendingTransition() after each startActivity() and in the onResume() of different activities), the same concept should work here as well but it does not. – devanshu_kaushik Oct 12 '11 at 05:19