@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
try {
if (mTargetView != null && mAnimationStep == ANIMATION_STEP_PLAY) {
LayoutParams l = mTargetView.getLayoutParams();
if (mAnimationMode == ANIMATION_MODE_WIDTH || mAnimationMode == ANIMATION_MODE)
l.width = (int) (startX + (toX - startX) * interpolatedTime);
if (mAnimationMode == ANIMATION_MODE_HEIGHT || mAnimationMode == ANIMATION_MODE)
l.height = (int) (startY + (toY - startY) * interpolatedTime);
mTargetView.requestLayout();
}
} catch (Exception e) {
Log.e(TAG, "Exception applyTransformation", e);
}
}
MorphAnimation.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:Android-MorphAnimation
作者:
评论列表
文章目录