问题
I am developing an Android component that has the same functionality as a news Ticker. It's a ViewGroup that takes an array of Views and animate them to create the effect of a Ticker.
I have implemented the onMeasure and onLayout methods, and I have a timer that calls a method every X time to refresh the position of every View. It basically moves the position of every child by 5 pixels lets say.
Everything is working great so far, but the problem is that a few seconds after the Views start moving, they start to overlap on each others, as if some of them are going faster than others. I am moving all the Views with the same amount of pixels so they should be moving at the same speed. This problem only occurs on some devices (like the Galaxy SIII) and just works fine on others.
Any idea why this is happening?
来源:https://stackoverflow.com/questions/13162888/android-viewgroup-ticker