ObjectAnimator oa=ObjectAnimator.ofFloat(iv,"translationX",0,10.0f,20.0f,30.0f);oa.setDuration(4000);oa.setRepeatCount(ObjectAnimator.INFINITE);oa.set ...
分类:
其他好文 时间:
2017-07-11 11:15:59
阅读次数:
119
1.View的坐标参数 主要有哪些?分别有什么注意的要点? 答:Left,Right,top,Bottom 注意这4个值其实就是 view 和 他的父控件的 相对坐标值。 并非是距离屏幕左上角的绝对值,这点要注意。 此外,X和Y 其实也是相对于父控件的坐标值。 TranslationX,Transl ...
分类:
移动开发 时间:
2016-12-03 23:40:44
阅读次数:
305
View 基础知识View 是 Android 中所有控件的基类,ViewGroup 也继承了 View。
Android 中,x 轴和 y 轴的正方向分别为右和下。 位置参数:(left , top ): View 左上角原始坐标
(right, bottom): View 右下角原始坐标
(x , y ): View 左上角最终坐标
translationX: View...
分类:
移动开发 时间:
2016-05-12 19:28:25
阅读次数:
219
在nineoldandroids库中有三种方式实现控件的动画效果。
第一:
ObjectAnimator.ofFloat(target, "translationX", 0, 50, -50, 0).setDuration(duration).start();
ObjectAnimator.ofFloat(t...
分类:
移动开发 时间:
2016-05-07 10:55:12
阅读次数:
599
1. View的边界,left, top, right, bottom(即左上右下),这些值都是相对View的父容器说的; 2. View的x, translationX, y, translationY, translationX/Y表示相对于left,top的偏移,一般用在View的transl ...
分类:
移动开发 时间:
2016-03-26 23:43:45
阅读次数:
284
注意:上图中的公式有误,正确的应该为: x = left + translationX y = top + translationY
分类:
移动开发 时间:
2016-02-21 14:17:08
阅读次数:
176
一、View基础View的位置参数:参数:top,left,right,bottom x,y,translationX,translationY(android3.0之后)四个顶点确定:top(左上纵坐标)、left(左上横坐标)、right(右下横坐标)、bottom(右下纵坐标)。相对于父容器来...
分类:
其他好文 时间:
2016-02-18 18:01:01
阅读次数:
136
1.View的坐标参数 主要有哪些?分别有什么注意的要点? 答:Left,Right,top,Bottom 注意这4个值其实就是 view 和 他的父控件的 相对坐标值。 并非是距离屏幕左上角的绝对值,这点要注意。 此外,X和Y 其实也是相对于父控件的坐标值。 TranslationX,Transl
分类:
移动开发 时间:
2016-02-03 10:42:32
阅读次数:
272
view:top、left、right、bottom,相对于parent的位置参数,获取通过get*()来获取。width=right-left、height=bottom-top。x=left+translationx,y=top+translationY。translationX和transla...
分类:
移动开发 时间:
2016-01-21 15:49:21
阅读次数:
146