导航

随笔分类 -  Android-Animation

摘要:png图片代码ImageView loading=getActivity().findViewById(R.id.pro_loading); LinearInterpolator lin = new LinearInterpolator(); am = n... 阅读全文

posted @ 2014-05-18 21:25 曙光城邦 阅读(361) 评论(0) 推荐(0)

摘要:其他构造器的旋转也可参考这副图。 RotateAnimation旋转坐标系为以旋转点为坐标系(0,0)点。x轴为0度,顺时针方向旋转一定的角度。 1.RotateAnimation(fromDegrees, toDegrees) [默认以View左上角顶点为旋转点]。 X轴顺时针转动到fromDegrees为旋转的起始点, X轴顺时针转动到toDegrees为旋转的起始点。 如fromDegrees=0,toDegrees=90;为左上角顶点为旋转点。0度为起始点,90度为终点。进行旋转,旋转了90度 如fromDegrees=60,toDegrees=90;为左上角顶点为旋转点。60度为.. 阅读全文

posted @ 2012-07-13 16:08 曙光城邦 阅读(3864) 评论(0) 推荐(1)

摘要:透明动画:1 不透明0 透明0-1中间的值为半透明度 final AlphaAnimation alphaAnimation = new AlphaAnimation(1, 0);//不透明到完全透明 alphaAnimation.setDuration(5000);//动画时间 alphaAnimation.setRepeatCount(4);//重复4次 阅读全文

posted @ 2012-07-13 15:29 曙光城邦 阅读(229) 评论(0) 推荐(0)

摘要:1.ScaleAnimation(float fromX, float toX, float fromY, float toY) 从原始大小,放大到两倍.以左边为开始点。(fromX=1,fromY=1,toX=2,toY=2) 从零放大两倍(fromX=0,fromY=0,toX=2,toY=2) 2.ScaleAnimation(float fromX, float toX, float fromY, float toY, float pivotX, float pivotY) (pivotX,pivotY)为放大的中心点。 3.ScaleAnimation(1,2,1,2,Animat. 阅读全文

posted @ 2012-07-13 15:14 曙光城邦 阅读(1202) 评论(0) 推荐(0)

摘要:TranslateAnimation(float fromXDelta, float toXDelta, float fromYDelta, float toYDelta);从(fromXDelta,fromYDelta)坐标点移动到(toXDelta,toYDelta)坐标点。这些坐标点指的是增量坐标。如:当前View在(10,10)坐标点。 1.TranslateAnimation(0,10,0,10);即为以当前点为起始点偏移x=10,y=10的距离。效果为当前View从自己的位置移动到了自己位置下方的(10,10)点 2.TranslateAnimation(10,20,10,20); 阅读全文

posted @ 2012-07-13 11:48 曙光城邦 阅读(1781) 评论(0) 推荐(0)