Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

Alpha animation in pre-HC not working if view has background #54

Open
billdawson opened this issue Sep 4, 2013 · 1 comment
Open

Alpha animation in pre-HC not working if view has background #54

billdawson opened this issue Sep 4, 2013 · 1 comment

Comments

@billdawson
Copy link

A simple alpha animation ....

ViewPropertyAnimator.animate(view).alpha(0.0f); // does nothing pre-HC if view has background

... appears to do nothing on pre-HC (Gingerbread, specifically) if the view has a background. Specifically, a color background (ColorDrawable) -- I haven't tested other background drawables.

If I add a transformation such as a rotation ...

ViewPropertyAnimator.animate(view).alpha(0.0f).rotationBy(45f); // works fine

... then it all works fine. Also, if I remove the background from the view, it works fine even when only the alpha property is changed.

I've studied the code a bit, and it pretty much seems like the alpha animation is being done in the same way as the built-in, old-style AlphaAnimation. But the AlphaAnimation works fine, so I guess something is different.

@renfu8888
Copy link

thanks a lot appreciate your effort .

At 2013-09-05 02:50:37,"Bill Dawson" [email protected] wrote:

A simple alpha animation ....

ViewPropertyAnimator.animate(view).alpha(0.0f); // does nothing pre-HC if view has background

... appears to do nothing on pre-HC (Gingerbread, specifically) if the view has a background. Specifically, a color background (ColorDrawable) -- I haven't tested other background drawables.

If I add a transformation such as a rotation ...

ViewPropertyAnimator.animate(view).alpha(0.0f).rotationBy(45f); // works fine

... then it all works fine. Also, if I remove the background from the view, it works fine even when only the alpha property is changed.

I've studied the code a bit, and it pretty much seems like the alpha animation is being done in the same way as the built-in, old-style AlphaAnimation.

¡ª
Reply to this email directly or view it on GitHub.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants