bassJe / android-wheel

Automatically exported from code.google.com/p/android-wheel
0 stars 0 forks source link

Single item animation #47

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I have a problem with wheelView: when slot stops i need to setup animation 
on single item. How can i do it?
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by silviosc...@gmail.com on 16 Jan 2013 at 4:44

GoogleCodeExporter commented 8 years ago
Animations does not seem to work on the wheel rows. 
Do you know why?
Thanks.

Original comment by lanist...@gmail.com on 27 May 2013 at 5:42

GoogleCodeExporter commented 8 years ago
I think I now the problem.

The thing is if i call invalidate on a row of the wheel, nothing happens 
because items are drawn manually on a canvas.

I must call invalidate on the whole wheel to update the display. Therefore 
Animations wont work here.

A workaround is to implement an animation with a message handler and update the 
whole wheel at each frame.

Original comment by lanist...@gmail.com on 27 May 2013 at 7:16

GoogleCodeExporter commented 8 years ago
I agree with you in each part. I tried to call invalidate on each wheel but 
nothing happened. Invalidate each row works well. 
Animations now are managed by an handler delayed message invalidating each 
custom view's onDraw() method. The animation's performance are much related to 
hardware, so running same code in differents frame rate context give rise to 
unexpected or not wanted dynamics.

Original comment by silviosc...@gmail.com on 27 May 2013 at 8:35