public class ContinuousWeightedSort extends ContinuousSort
RadialSort.Position
Modifier and Type | Field and Description |
---|---|
static double |
HEAVY_WEIGHT |
static double |
LIGHT_WEIGHT |
static double |
MEDIUM_WEIGHT |
Constructor and Description |
---|
ContinuousWeightedSort(long interObjectDelay,
boolean reversed,
RadialSort.Position position,
double horizontalWeight,
double verticalWeight)
Establishes a weighted delay between object animations and their starting position based on distance,
delay, a value from the Position enum, a horizontal value of Weight and
a vertical Weight value from the Weight 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.
|
java.util.List<SpruceTimedView> |
getViewListWithTimeOffsets(android.view.ViewGroup parent,
java.util.List<android.view.View> children)
Get a list of SpruceTimedView
|
getDistancePoint
public static final double LIGHT_WEIGHT
public static final double MEDIUM_WEIGHT
public static final double HEAVY_WEIGHT
public ContinuousWeightedSort(long interObjectDelay, boolean reversed, RadialSort.Position position, double horizontalWeight, double verticalWeight)
interObjectDelay
- delay between object animationsreversed
- flag to indicate if the animation should be reversedposition
- enum value of the position the animation should start fromhorizontalWeight
- double value of the horizontal weightverticalWeight
- double value of the vertical weightpublic java.util.List<SpruceTimedView> getViewListWithTimeOffsets(android.view.ViewGroup parent, java.util.List<android.view.View> children)
SortFunction
getViewListWithTimeOffsets
in class ContinuousSort
parent
- ViewGroup parent of the collection of child viewschildren
- List of views to be animatedpublic double getDistanceBetweenPoints(android.graphics.PointF left, android.graphics.PointF right)
euclideanDistance
method.left
- PointFright
- PointF