public class LinearSort extends SortFunction
| Modifier and Type | Class and Description |
|---|---|
static class |
LinearSort.Direction |
| Constructor and Description |
|---|
LinearSort(long interObjectDelay,
boolean reversed,
LinearSort.Direction direction)
Establishes the delay between object animations and their direction based on distance,
delay, and a value from the Direction enum
|
| Modifier and Type | Method and Description |
|---|---|
double |
getDistanceBetweenPoints(android.graphics.PointF left,
android.graphics.PointF right)
Find the double value of the distance between two points.
|
android.graphics.PointF |
getDistancePoint(android.view.ViewGroup parent,
java.util.List<android.view.View> children)
Get the point that's closest to the start point
|
java.util.List<SpruceTimedView> |
getViewListWithTimeOffsets(android.view.ViewGroup parent,
java.util.List<android.view.View> children)
Get a list of SpruceTimedView
|
public LinearSort(long interObjectDelay,
boolean reversed,
LinearSort.Direction direction)
interObjectDelay - delay between object animationsreversed - flag to indicate if the animation should be reverseddirection - enum value of the direction the animation should start from and end withpublic java.util.List<SpruceTimedView> getViewListWithTimeOffsets(android.view.ViewGroup parent, java.util.List<android.view.View> children)
SortFunctionparent - ViewGroup parent of the collection of child viewschildren - List of views to be animatedpublic android.graphics.PointF getDistancePoint(android.view.ViewGroup parent,
java.util.List<android.view.View> children)
children - List of views to sort by distancepublic double getDistanceBetweenPoints(android.graphics.PointF left,
android.graphics.PointF right)
euclideanDistance method.left - PointFright - PointF