There has been no use of attribute animation, think can rely on postdelayed () a task to constantly invalidate this view to achieve animation effect.
But today we find it smoother to use property animations
public void Rotateyanimrun (final view view)
{
Objectanimator Anim = objectanimator//
. Offloat (View, "Zhy", 1.0F, 0.0F)//
. setduration (500);//
Anim.start ();
Anim.addupdatelistener (New Animatorupdatelistener ()
{
@Override
public void Onanimationupdate (Valueanimator animation)
{
Here gives us time contact Refresh view, here will make the effect look more fluent, the reason should be statistically good human eye smooth time node
float cval = (float) animation.getanimatedvalue ();
View.setalpha (Cval);
View.setscalex (Cval);
View.setscaley (Cval);
}
});
}
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Android Properties Animation Summary