Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Artifacts using Animation

I am having a problem with visual artifacts on the screen when applying the 3D transformation found here. I have changed this so it rotates around the x axis instead of the y. When i do a full 180 rotation (top going away from you at first) im getting single pixel line artifacts at the bottom area (bottom 10-20%) of every other view that this is applied to. I am using a selector as the background of a LinearLayout and then applying this Animation to it. Can anyone think of a quick solution to this issue?

Thanks for any help!

like image 420
Dori Avatar asked Oct 04 '11 19:10

Dori


Video Answer


1 Answers

Turns out you just have to invalidate the parent view on each animation step. If you have a custom Animation object you can just do this inside Animation.applyTransformation(...)

like image 162
Dori Avatar answered Sep 23 '22 14:09

Dori