X Tutup
Skip to content

Commit c76c67d

Browse files
committed
update doucumentation
1 parent 83ca5fb commit c76c67d

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

notes/Android动画:Animation篇.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,12 @@ Android 动画框架详解:https://www.ibm.com/developerworks/cn/opensource/os
7171

7272
http://www.cnblogs.com/wondertwo/p/5295976.html
7373

74-
矩阵知识,以及矩阵生成的XY轴的图如何展示(有什么工具可以画出来吗)Python http://liam0205.me/2014/09/11/matplotlib-tutorial-zh-cn/
74+
矩阵知识,以及矩阵生成的XY轴的图如何展示(有什么工具可以画出来吗)
75+
76+
这些动画效果遵循的数学公式是什么????? http://blog.csdn.net/linmiansheng/article/details/18820599
77+
78+
例子:http://www.apkbus.com/blog-104974-52806.html
7579

76-
这些动画效果遵循的数学公式是什么?????
7780

7881
## 关于 Matrix
7982

@@ -87,4 +90,10 @@ Android Matrix矩阵详解:http://www.maplejaw.com/2016/06/21/Android-Matrix%E
8790

8891
Android Matrix理论与应用详解 http://zensheno.blog.51cto.com/2712776/513652
8992

90-
Android Matrix:http://www.cnblogs.com/qiengo/archive/2012/06/30/2570874.html(透视那块,既然文档没有提,那就稍作解释然后忽略即可)
93+
Android Matrix:http://www.cnblogs.com/qiengo/archive/2012/06/30/2570874.html (透视那块,既然文档没有提,那就稍作解释然后忽略即可)
94+
95+
矩阵的左乘右乘法概念:http://www.cnblogs.com/ylwn817/archive/2011/12/15/2288921.html
96+
97+
2D平面中关于矩阵(Matrix)跟图形变换的讲解: http://blog.csdn.net/linmiansheng/article/details/18801947
98+
99+
Android中关于矩阵(Matrix)前乘后乘的一些认识:http://blog.csdn.net/linmiansheng/article/details/18820599

src/main/java/com/clock/study/animation/SimpleCustomAnimation.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public void initialize(int width, int height, int parentWidth, int parentHeight)
2525
super.initialize(width, height, parentWidth, parentHeight);
2626
this.mWidth = width;
2727
this.mHeight = height;
28-
/*setFillAfter(true);
29-
setDuration(15000);*/
28+
//setFillAfter(true);
29+
//setDuration(15000);
3030
}
3131

3232
@Override
@@ -43,10 +43,11 @@ protected void applyTransformation(float interpolatedTime, Transformation t) {
4343
matrix.getValues(data);
4444
data[Matrix.MPERSP_1] = interpolatedTime * 1;
4545
matrix.setValues(data);*/
46-
matrix.preScale(interpolatedTime, interpolatedTime, mWidth / 2, mHeight / 2);
47-
matrix.preRotate(interpolatedTime * 360, mWidth / 2, mHeight / 2);
48-
matrix.preTranslate(-mWidth / 3, -mHeight / 2);
49-
matrix.postTranslate(mWidth, mHeight);
46+
matrix.preScale(interpolatedTime, interpolatedTime);
47+
matrix.preRotate(interpolatedTime * 360);
48+
//matrix.preTranslate(-mWidth / 2, -mHeight / 2);
49+
matrix.postTranslate(mWidth / 2, mHeight / 2);
50+
//t.setAlpha(interpolatedTime);
5051
Log.i(TAG, "-------------applyTransformation-------------");
5152
Log.i(TAG, "interpolatedTime:" + interpolatedTime);//动画持续的时间,时间比例系数(0.0 到 1.0)之间
5253
Log.i(TAG, "transformation:" + t);//控制动画效果,Transformation包含两个信息,一个Alpha值,一个Matrix矩阵,这里的Matrix默认是一个单位矩阵

0 commit comments

Comments
 (0)
X Tutup