public interface CloseUpAlgorithm
ScrollableLayout
,
use with ScrollableLayout.setCloseUpAlgorithm(CloseUpAlgorithm)
Created by Dimitry Ivanov on 22.05.2015.
Modifier and Type | Method and Description |
---|---|
int |
getFlingFinalY(ScrollableLayout layout,
boolean isScrollingBottom,
int nowY,
int suggestedY,
int maxY)
This method computes end scroll y after fling event was detected
|
int |
getIdleFinalY(ScrollableLayout layout,
int nowY,
int maxY)
This method will be fired after scroll state of a
ScrollableLayout would be considered idle |
int getFlingFinalY(ScrollableLayout layout, boolean isScrollingBottom, int nowY, int suggestedY, int maxY)
layout
- ScrollableLayout
isScrollingBottom
- whether ScrollableLayout
would scroll to top or bottomnowY
- current scroll y of the *layout*suggestedY
- scroll y that is suggestedmaxY
- current max scroll y of the *layout*int getIdleFinalY(ScrollableLayout layout, int nowY, int maxY)
ScrollableLayout
would be considered idlelayout
- ScrollableLayout
nowY
- current scroll y of the *layout*maxY
- current max scroll y of the *layout*ScrollableLayout.getConsiderIdleMillis()
,
ScrollableLayout.setConsiderIdleMillis(long)