旋转的参数

来源:互联网 发布:各大电商平台双11数据 编辑:程序博客网 时间:2024/06/05 14:31

旋转的参数

    float fromDegrees = -180F;//从哪里到哪里,逆时针为负,顺时针为正    float toDegrees = 0F;    int pivotXType = RotateAnimation.RELATIVE_TO_SELF;    float pivotXValue = 0.5F;    int pivotYType = RotateAnimation.RELATIVE_TO_SELF;    float pivotYValue = 1F;    RotateAnimation ra = new RotateAnimation(fromDegrees, toDegrees,            pivotXType, pivotXValue, pivotYType, pivotYValue);    viewGroup.startAnimation(ra);    RotateAnimation.ABSOLUTE //绝对位置 (10,10),后面的一个点    RotateAnimation.RELATIVE_TO_SELF; //相对自己的位置    RotateAnimation.RELATIVE_TO_PARENT //相对父容器的位置
0 0