By default, animation is not applied, at least on honeycombs. The view will simply appear.
You can do something like this if you want to revive it:
Find the child on the tab and play the animation on it.
Example: First install the listener:
exampleTabhost.setOnTabChangedListener(new OnTabChangeListener()
{
@Override
public void onTabChanged(String tabId)
{
refreshTabHostUI(exampleTabhost);
}
});
In your listener, play the animation on the tab:
View tab1 = th.findViewById(R.id.tab1);
if( tab1 != null )
playAnim(tab1, getBaseContext(), android.R.anim.fade_in, 500);
Animation Playback Function:
public Animation playAnim( View v, Context con, int animationid, int startOffset )
{
if( v != null )
{
Animation animation = AnimationUtils.loadAnimation(con, animationid );
animation.setStartOffset(startOffset);
v.startAnimation(animation);
return animation;
}
return null;
}
source
share