安卓scale动画pivotX详解

pivotXType    int: Specifies how pivotXValue should be interpreted. One of Animation.ABSOLUTE, Animation.RELATIVE_TO_SELF, or Animation.RELATIVE_TO_PARENT.


pivotXValue:  float: The X coordinate of the point about which the object is being scaled, specified as an absolute number where 0 is the left edge. (This point remains fixed while the object changes size.) This value can either be an absolute number if pivotXType is ABSOLUTE, or a percentage (where 1.0 is 100%) otherwise.

安卓scale动画pivotX详解_第1张图片


安卓scale动画pivotX详解_第2张图片



安卓scale动画pivotX详解_第3张图片


如果设置为:

Animation.ABSOLUTE
则pivotX就是偏移
坐标值

安卓scale动画pivotX详解_第4张图片


如果设置为:
Animation.
RELATIVE_TO_PARENT
则pivotX就是相对父控件偏移值

你可能感兴趣的:(安卓小程序)