animating views
In view animation, the View app animation does not change the view's properties, so the active area is the area before the animation is applied, such as when you move a button, the Click button does not have any reaction, it must be to his initial position to click.
Once the button is moved to the 200 position, clicking on the button does not work, then clicking on the initial position, the button will appear, so the effect is very bad
To change this, add some parameters to the view in Android 3.0 and add the corresponding Getter/setter function to these parameters (Objectanimator to change these properties with these functions):
- Translationx,translationy:view offset relative to the original position
- Rotation,rotationx,rotationy: Swivel, rotation for 2D rotation angle, 3D for the latter two
- Scalex,scaley: Zoom ratio
- The final coordinate of the X,y:view is the left,top position of the view plus the Translationx,translationy
- Alpha: Transparency
Objectanimator animation = objectanimator.offloat (Button, "Translationx", 0f, 200f);
oa.setduration (+);
Oa.start ();
Now you can add animations and modify properties in such a way
Android Property Animation Animation