public void finishZoomOutAnimation() {
if (at != null) {
if (at.isAlive()) {
dragZoomOutAnimation = true;
at.setEndScale(INIT_REDUCE_FINAL_VALUE);
at.setSleepTime(FINISH_ZOOM_OUT_SLEEP_TIME);
at.setAnimationState(AnimationThread.STATE_ZOOM_OUT);
setAnimationListener();
} else {
dragZoomOutAnimation = true;
at = new AnimationThread(this, getScaleValue(matrix), INIT_REDUCE_FINAL_VALUE, SCALE_INCREMENT_VALUE,
FINISH_ZOOM_OUT_SLEEP_TIME);
needScaleCenterImg = true;
setAnimationListener();
at.start();
}
}
}
private void setAnimationListener() {
at.setOnListener(new AnimationThread.AnimationListener() {
public void onStart() {
}
public void onEnd() {
needScaleCenterImg = false;
if (at != null) {
at.setCurrentScale(BLOWUP_FINAL_VALUE);
}
}
public void onError() {
}
});
}
private float getScaleValue(Matrix matrix) {
float[] a = new float[9];
matrix.getValues(a);
return a[0];
}
private void drawCenterImg(Canvas canvas, boolean flag) {
LengthCalculate calculate = LengthCalculate.getInstance();
Drawable centerDrag = getResources().getDrawable(R.drawable.center_drag);
Rect rect = new Rect(0, 0, getWidth(), getHeight() - calculate.getGroupHeight());
if (flag) {
matrix.setScale(at.getCurrentScale(), at.getCurrentScale(), calculate.getCenterPointX(this),
calculate.getCenterPointY(this));
}
canvas.concat(matrix);
centerDrag.setBounds(rect);
centerDrag.draw(canvas);
}
private void startAnimation(float start, float end, float increment, long sleepTime) {
if (at != null) {
at.stopAnimation();
}
at = new AnimationThread(this, start, end, increment, sleepTime);
needScaleCenterImg = true;
at.start();
}
分享到:
相关推荐
DOCOMO_5G Evolution and 6G white paper.rar
DOCOMO_5G Evolution and 6G white paper.pdf
SOT 23 -5 and 6 封装,本文件为SOT 23 -5 and 6 封装库可直接在DXP软件中应用,不需要手动画
Chapters 5 and 6 have also been revised, with many small alterations and corrections. The interdependence of chapters and prerequisites The book requires that students know the basics of elementary ...
"Professional C# 6 and .NET Core 1.0 "provides complete coverage of the latest updates, features, and capabilities, giving you everything you need for C#. Get expert instruction on the latest changes ...
Applies basic field behavior in circuit design and demonstrates how it relates to grounding and shielding requirements and techniques in circuit design This book connects the fundamentals of ...
A visual memory scale (VMS) Designed to measure short-term visual recognition memory in 5- and 6-year-old children 152 CHARLES K. MILLEH. AND NORMAN M. CHANSKY and the manner in which they can ...
Linear Algebra and Its Applications, Global 6th Edition
CRYPTOGRAPHY AND NETWORK SECURITY PRINCIPLES AND PRACTICE 的完整答案
Lecture 6 MATLAB® Wavelet Toolbox Lecture 7 Orthogonal Filter Banks: Paraunitary Matrices Orthogonality Condition (Condition O) in the Time Domain, Modulation Domain and Polyphase Domain Lecture 8 ...
Cryptography and Network Security Principles and Practice, International Edition(6th) 英文无水印原版pdf 第6版 pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Firefox测试都可以打开 本...
Xshell6 and Xftp6组合,免破解,直接能使用,注意上传时间
Design Patterns and Object Oriented Programming in Visual Basic 6 and VB.NET (VBL)
AnugnaPatibandla_C0791762_a5and6
Cryptography and Network Security Principles and Practice 6th edition
Write good regexes and parsers with the Perl 6 programming language. You’ll see how regexes are used for searching, parsing, and validation: in particular the grammar extension makes them uniquely ...
Computer Organization and Design, Fifth Edition, is the latest update to the classic introduction to computer organization. The text now contains new examples and material highlighting the emergence ...
help and manual 6.x 注册机,适用于版本6
Chapter 6: Source Coding and Transmission Techniques* Chapter 7: Advanced Transmission Techniques to Support Current and Emergent Multimedia Services Chapter 8: Services and Applications Chapter 9: ...
6 CDMA Code Channel Assignment 120 6.1 Introduction 120 6.2 System Model and Assumptions 123 6.3 Throughput and Bottleneck of General Graphs 126 6.4 Approximation Algorithms for Interference Graphs ...