Back to project page synchroller.
The source code is released under:
MIT License
If you think the Android project synchroller listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ru.egslava.synchroller; /*w w w.j a va 2 s .com*/ /** * The interface is needed to get known how to calculate the virtual (scrollable) size of component. * For example, physical component size on screen is 640x480, but we can scroll much more: * 2 or 2 screens up and down. So virtual size is 1280x960. * * So, according to scrollviews, extent - is a physical size of view and extent - is the virtual. * @see http://stackoverflow.com/a/16889455/1444191 for more information */ public interface RangeComputer{ /** * Calls every time it needs to update scroll position */ void computeScroll(); /** * @return computed (cached) size of total (virtual) area. All processings should be in #computeScroll() */ int computeHorizontalScrollExtent(); /** * @return computed (cached) size of real usually, getMeasuredWidth(). All processings should be in #computeScroll() */ int computeHorizontalScrollRange(); /** * @return computed (cached) size of total (virtual) area. All processings should be in #computeScroll() */ int computeVerticalScrollExtent(); /** * @return computed (cached) size of real usually, getMeasuredHeight(). All processings should be in #computeScroll() */ int computeVerticalScrollRange(); }