What does the scroller in Android ViewGroup have to do with Computescroll?
Answer: There is no direct relationship.
Knowing the answer, does not mean that the following is not necessary to see, if the ViewGroup custom control is not interested, you can not see.
What exactly is 1.Scroller?
A: Scroller is just a calculator that provides interpolation calculations that allow the scrolling process to have animated properties, but it is not a UI, nor is it a sliding auxiliary UI movement, but rather simply provides a calculation for sliding.
Regardless of the constructor method or other methods, as well as the properties of scroller, it does not hold view, auxiliary viewgroup sliding
2.Scroller just provides calculations, then who's going to call Computescroll makes ViewGroup slide
A: Computescroll is not to let viewgroup sliding, really let viewgroup slide is Scrollto,scrollby. The role of Computescroll is to calculate how viewgroup slides. And Computescroll is called through draw.
3.computeScroll and scroller are all computations, what's the relationship between them?
A: The article began to answer, there is no direct relationship. If Computescroll and scroller are flying, it is that computescroll can refer to scroller calculations to influence Scrollto,scrollby, which makes sliding change. That is, Scroller does not call Computescroll, instead, Computescroll calls Scroller.
4. When sliding continuously, how to make the calculation of scroller is continuous?
This asked when to call Computescroll, as said Computescroll call Scroller, as long as the computescroll call continuous, scroller will continue, Essentially Computescroll continuity and Invalidate method control, Scrollto,scrollby will invoke invalidate, and invalidate back to trigger draw, thus computescroll be called continuously, In summary, Scroller will also be called continuously unless invalidate stop the call.
5.computeScroll how to keep in line with the scroller invocation process.
Computescroll reference scroller influence Scrollto,scrollby, in essence, in order not to repeat the effect of Scrollto,scrollby, scroller must terminate the calculation of Currx,curry. To know if the calculation is terminated, you need to pass Mscroller.computescrolloffset ()
The above mentioned is relatively clear, I believe that the Android Scroller and computescroll of the call mechanism of the relationship between it, if there are questions welcome to my message, thank you all the time to the cloud-Habitat community website support.