use of com.android.tools.sherpa.animation.AnimatedHoverAnchor in project android by JetBrains.
the class SceneDraw method setCurrentUnderneathAnchor.
/**
* Start an animation for the current anchor (under the mouse)
*
* @param underneathAnchor
*/
public void setCurrentUnderneathAnchor(ConstraintAnchor underneathAnchor) {
if (mCurrentUnderneathAnchor != underneathAnchor) {
mCurrentUnderneathAnchor = underneathAnchor;
mChoreographer.removeAnimation(mAnimationCurrentAnchor);
if (mCurrentUnderneathAnchor != null) {
ConstraintHandle constraintHandle = WidgetInteractionTargets.constraintHandle(mCurrentUnderneathAnchor);
mAnimationCurrentAnchor = new AnimatedHoverAnchor(mColorSet, constraintHandle);
mChoreographer.addAnimation(mAnimationCurrentAnchor);
} else {
mAnimationCurrentAnchor = null;
}
}
}
Aggregations