Code example for RotateAnimation

Methods: setAnimationListenersetDuration

	 * @param durationMillis 持续时间 
	 * @param animationListener 动画监听器 
	 * @return 一个旋转动画 
	public static RotateAnimation getRotateAnimation(float fromDegrees, float toDegrees, int pivotXType, float pivotXValue, int pivotYType, float pivotYValue, long durationMillis, AnimationListener animationListener){
		RotateAnimation rotateAnimation = new RotateAnimation(fromDegrees, toDegrees, pivotXType, pivotXValue, pivotYType, pivotYValue);
		if(animationListener != null){
		return rotateAnimation;
	 * 获取一个根据视图自身中心点旋转的动画 
	 * @param durationMillis 动画持续时间 
	 * @param animationListener 动画监听器 
	 * @return 一个根据中心点旋转的动画 
	public static RotateAnimation getRotateAnimationByCenter(long durationMillis, AnimationListener animationListener){
Connect your IDE to all the code out there  Get Codota for Java