public class DefaultCloseUpAlgorithm extends java.lang.Object implements CloseUpAlgorithm
CloseUpAlgorithm
With this implementation ScrollableLayout would have only two states - collapsed & expandedCreated by Dimitry Ivanov on 23.05.2015.| Constructor and Description |
|---|
DefaultCloseUpAlgorithm() |
| 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 |
public int getFlingFinalY(ScrollableLayout layout, boolean isScrollingBottom, int nowY, int suggestedY, int maxY)
getFlingFinalY in interface CloseUpAlgorithmlayout - ScrollableLayoutisScrollingBottom - 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*public int getIdleFinalY(ScrollableLayout layout, int nowY, int maxY)
ScrollableLayout would be considered idlegetIdleFinalY in interface CloseUpAlgorithmlayout - ScrollableLayoutnowY - current scroll y of the *layout*maxY - current max scroll y of the *layout*ScrollableLayout.getConsiderIdleMillis(),
ScrollableLayout.setConsiderIdleMillis(long)