Missing rotation animation property


new user

I'm reading Android Developer's API guide , especially about View Animation .

The examples in this page use the rotateelement in particular:

   <rotate
       android:fromDegrees="0"
       android:toDegrees="-45"
       android:toYScale="0.0"
       android:pivotX="50%"
       android:pivotY="50%"
       android:startOffset="700"
       android:duration="400" />

One of the labels is toYscale. What I don't understand is how it is a valid property, since it is not included in either the RotateAnimation class or R.styleable .

Shouldn't the property appear in the class reference? Unless I have to check all the supported attributes (by element) elsewhere ?rotate

Is there a pointer?

A--C

I agree with @WKS , most likely a typo from whoever wrote the docs, because:

  • The R.styleableproperty 's full name is R.styleable.ScaleAnimation_toYScale.

It wouldn't be named that way if it wasn't specific ScaleAnimation, especially since RotateAnimation it doesn't expand ScaleAnimation.


public RotateAnimation(Context context, AttributeSet attrs) {
    super(context, attrs);

    TypedArray a = context.obtainStyledAttributes(attrs,
            com.android.internal.R.styleable.RotateAnimation);

    mFromDegrees = a.getFloat(
            com.android.internal.R.styleable.RotateAnimation_fromDegrees, 0.0f);
    mToDegrees = a.getFloat(com.android.internal.R.styleable.RotateAnimation_toDegrees, 0.0f);

    Description d = Description.parseValue(a.peekValue(
        com.android.internal.R.styleable.RotateAnimation_pivotX));
    mPivotXType = d.type;
    mPivotXValue = d.value;

    d = Description.parseValue(a.peekValue(
        com.android.internal.R.styleable.RotateAnimation_pivotY));
    mPivotYType = d.type;
    mPivotYValue = d.value;

    a.recycle();

    initializePivotPoint();
}

When in doubt, you can always check to see if something is android:toYScale=actually being done when using it in<rotate>. There are errors in these documents, they are human made after all.

Related


Missing rotation animation property

new user I'm reading Android Developer's API guide , especially about View Animation . The examples in this page use the rotateelement in particular: <rotate android:fromDegrees="0" android:toDegrees="-45" android:toYScale="0.0"

CSS endless rotation animation

Alexander Ruliov I want to rotate the loading icon via CSS. I have an icon and the following code: <style> #test { width: 32px; height: 32px; background: url('refresh.png'); } .rotating { -webkit-transform: rotate(360deg); -webkit-transiti

Rotation animation with spring effect

Kralbsk I want to rotate a CAShapeLayer with spring effect (like in UIView.animateWithDuration(_:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:)) but on a layer on the view. When the button is tapped, its main layer's sublaye

Camera rotation animation

Xorgon I simulate a spinning cube full of particles by moving the gravity vector instead of changing all the geometry. I want to use the ParaView animation tool to rotate the camera so that the gravity vector is pointing down, so everything looks correct. When

Rotation animation on another axis

Jeff Proud I'm trying to use animation to rotate an object on a different axis than the default one. This is actually how I do it. You can click the button Land Liit actually works. But as you can see, the Rbutton's rotation axis should change. I do not know w

Rotation animation on another axis

Jeff Proud I'm trying to use animation to rotate an object on a different axis than the default one. This is actually how I do it. You can click the button Land Liit actually works. But as you can see, the Rbutton's rotation axis should change. I do not know w

Animation rotation in ImageView is not smooth

Parama Suda I need to make ImageView rotate. For this I have used the following code. res / anim / rotator.xml: <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/linear_interpolator"> <rotat

Rotation animation on another axis

Jeff Proud I'm trying to use animation to rotate an object on a different axis than the default one. This is actually how I do it. You can click the button Land Liit actually works. But as you can see, the Rbutton's rotation axis should change. I do not know w

CSS endless rotation animation

Alexander Ruliov I want to rotate the loading icon via CSS. I have an icon and the following code: <style> #test { width: 32px; height: 32px; background: url('refresh.png'); } .rotating { -webkit-transform: rotate(360deg); -webkit-transiti

Delayed rotation WPF animation

Joker Martini No matter what I change, I can't get the rotation to be delayed to milliseconds. I want to delay each ellipse slightly. You should be able to see 3 ellipse objects in the image below, but they are overlapping each other. Can someone help me with

Rotation animation with custom view

Krishner I have a custom View, IndicatorView, which is essentially a triangle that orients itself according to a specified angle of a circle with a radius equal to the length of the triangle. The angle the triangle is pointing at is frequently updated and I wa

SVG path rotation animation

Turner Horton I'm trying to rotate a part of my SVG, but it seems like it's rotating around a very large origin, which is confusing because the actual path is very small. Here is my path element animation css: .wing1 { transform-origin: bottom right; anima

SVG rotation animation

Sean I'm a beginner to svg and I'm trying to animate the svg to -45 degrees. I am using Snap.js to handle animations. The animation doesn't behave as I expected and I'm not sure how to fix it. The animation ends at the correct position, but when it rotates it

How to link rotation animation?

Arnold I want to rotate ImageView. But I want to rotate from 0 to 45 to -45 and then back to 0 to sum up my goals. I tried creating 4 rotationAnimationand combining them with AnimatorSet. Here is my code: rotate = new RotateAnimation(0, 45, Animation.RELAT

Rotation animation with spring effect

Kralbsk I want to rotate a CAShapeLayer with spring effect (like in UIView.animateWithDuration(_:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:)) but on a layer on the view. When the button is tapped, its main layer's sublaye

Camera rotation animation

Xorgon I simulate a spinning cube full of particles by moving the gravity vector instead of changing all the geometry. I want to use the ParaView animation tool to rotate the camera so that the gravity vector is pointing down, so everything looks correct. When

Pause rotation animation in WPF

Camille I can control the animation of the rotated image. I want to start, pause and resume the rotation animation at any time. I have included everything in the code behind: public partial class Wheel32Control : UserControl { public Wheel32Contro

Matplotlib line rotation or animation

sss I created a polar map and wanted to mimic a Doppler. This includes a 360-degree scan (polar plot) around the circle. After the scan reaches 360 degrees, it needs to go back to zero and continue scanning. How can I animate or rotate this line to continuousl

How to link rotation animation?

Arnold I want to rotate ImageView. But I want to rotate from 0 to 45 to -45 and then back to 0 to sum up my goals. I tried creating 4 rotationAnimationand combining them with AnimatorSet. Here is my code: rotate = new RotateAnimation(0, 45, Animation.RELAT

Rotation animation with spring effect

Kralbsk I want to rotate a CAShapeLayer with spring effect (like in UIView.animateWithDuration(_:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:)) but on a layer on the view. When the button is tapped, its main layer's sublaye

Rotation animation with spring effect

Kralbsk I want to rotate a CAShapeLayer with spring effect (like in UIView.animateWithDuration(_:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:)) but on a layer on the view. When the button is tapped, its main layer's sublaye

Rotation animation on another axis

Jeff Proud I'm trying to use animation to rotate an object on a different axis than the default one. This is actually how I do it. You can click the button Land Liit actually works. But as you can see, the Rbutton's rotation axis should change. I do not know w

WPF geometry rotation animation

username I want to rotate a custom shape with animation. When I run my app I get this message in the immediate window: BindingExpression path error: Cannot find property 'angle' on 'object' 'MatrixTransform' (HashCode=16493105). null my figure Dim myPointerPat

Rotation animation on another axis

Jeff Proud I'm trying to use animation to rotate an object on a different axis than the default one. This is actually how I do it. You can click the button Land Liit actually works. But as you can see, the Rbutton's rotation axis should change. I do not know w

Rotation animation on another axis

Jeff Proud I'm trying to use animation to rotate an object on a different axis than the default one. This is actually how I do it. You can click the button Land Liit actually works. But as you can see, the Rbutton's rotation axis should change. I do not know w

CSS endless rotation animation

Alexander Ruliov I want to rotate the loading icon via CSS. I have an icon and the following code: <style> #test { width: 32px; height: 32px; background: url('refresh.png'); } .rotating { -webkit-transform: rotate(360deg); -webkit-transiti

Delayed rotation WPF animation

Joker Martini No matter what I change, I can't get the rotation to be delayed to milliseconds. I want to delay each ellipse slightly. You should be able to see 3 ellipse objects in the image below, but they are overlapping each other. Can someone help me with

Rotation animation with spring effect

Kralbsk I want to rotate a CAShapeLayer with spring effect (like in UIView.animateWithDuration(_:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:)) but on a layer on the view. When the button is tapped, its main layer's sublaye