Search code examples
androidanimationviewgroup

Custom viewgroup with animated view


I made a custom viewgroup, and I need to use view animation to rotate some views...

But they are misbehaving, no matter if I put the startanimation inside onDraw, onLayout or onMeasure, my views flicker (you see them briefly rotated, and then briefly non-rotated, and that pattern repeats).

How I fix that?


Solution

  • see Android transfer animation of view in custom viewgroup and Animating Views

    view.animate().rotation(180);