Android animation doesn't work, probably some kind of screen redraw problem.

Posted by BenIOs on Stack Overflow See other posts from Stack Overflow or by BenIOs
Published on 2010-04-15T07:05:08Z Indexed on 2010/04/15 7:13 UTC
Read the original article Hit count: 187

Filed under:
|

I have created a custom component in my program by extending a ViewGroup. This component listens to touch events and are supposed to start animations when the user has move their finger past some certain points.

I'm able to start animations while the user is touching the screen. But I'm not able to start animations if the user doesn't move their finger. It's probably that the phone thinks it doesn't have to update the screen if the user isn't moving their finger.

I added some logs and according to them the animation starts and ends but it doesn't draw on the screen. I have the same problems when starting an animation with a timer.

I use AlphaAnimations and TranslateAnimations on ImageViews. I have tried to use invalidate() both on the component and the ImageView but it doesn't help.

Anyone who has an idea how to solve this?

© Stack Overflow or respective owner

Related posts about android

Related posts about animation