and5

if (at.isAlive()) {
if (!dragZoomOutAnimation) {
at.setAnimationState(AnimationThread.STATE_ZOOM_OUT);
}
} else if (!at.isNormalOver()) {
startAnimation(getScaleValue(matrix), REDUCE_FINAL_VALUE, SCALE_INCREMENT_VALUE, SLEEP_TIME); // narrow animation.
}

drawCenterImg(canvas, needScaleCenterImg);
} else {
if (at != null) {
if (at.isAlive()) {
at.setEndScale(BLOWUP_FINAL_VALUE);
at.setSleepTime(SLEEP_TIME);
at.setAnimationState(AnimationThread.STATE_ZOOM_IN);
} else {
if (at.getCurrentScale() != BLOWUP_FINAL_VALUE
&& (at.getAnimationState() == AnimationThread.STATE_ZOOM_OUT || dragZoomOutAnimation)) {
startAnimation(getScaleValue(matrix), BLOWUP_FINAL_VALUE, SCALE_INCREMENT_VALUE, SLEEP_TIME); // enlarge animation.
}
}

dragZoomOutAnimation = false;

if (at.isAlive()) {
drawCenterImg(canvas, true);
} else {
stopAnimation();
}
}
}
super.dispatchDraw(canvas);
}

@Override
public void removeView(View view) {
if (view instanceof Folder) {
havaOpenFolder = false;
}
super.removeView(view);
}

public void stopAnimation() {
if (at != null) {
at.stopAnimation();
at = null;
}
dragZoomOutAnimation = false;
matrix.setScale(BLOWUP_FINAL_VALUE, BLOWUP_FINAL_VALUE);
}

public void initAnimation() {
if (at != null) {
at.stopAnimation();
}
dragZoomOutAnimation = true;
needScaleCenterImg = true;
at = new AnimationThread(this, INIT_REDUCE_FINAL_VALUE, REDUCE_FINAL_VALUE, SCALE_INCREMENT_VALUE,
INIT_SLEEP_TIME);
at.start();
}

public void finishZoomInAnimation() {
if (at != null && !FadeAnimationView.isStarted) {
if (at.isAlive()) {
dragZoomOutAnimation = true;
at.setEndScale(BLOWUP_FINAL_VALUE);
at.setSleepTime(FINISH_ZOOM_IN_SLEEP_TIME);
at.setAnimationState(AnimationThread.STATE_ZOOM_IN);
} else {
dragZoomOutAnimation = true;
at = new AnimationThread(this, getScaleValue(matrix), BLOWUP_FINAL_VALUE, SCALE_INCREMENT_VALUE,
FINISH_ZOOM_IN_SLEEP_TIME);
needScaleCenterImg = true;
at.start();
}
}
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值