Parallax.IntProperty
public class Parallax.IntProperty extends Property
IntProperty provide access to an index based integer type property inside Parallax. The IntProperty typically represents UI element position inside Parallax.
Summary
Constants |
|
|---|---|
static final int |
UNKNOWN_AFTER = 2147483647Property value is unknown and it's larger than |
static final int |
UNKNOWN_BEFORE = -2147483648Property value is unknown and it's smaller than minimal value of Parallax. |
Public constructors |
|---|
IntProperty(String name, int index)Constructor. |
Public methods |
|
|---|---|
final Parallax.PropertyMarkerValue |
at(int offsetValue, float fractionOfMaxParentVisibleSize)Create an |
final Parallax.PropertyMarkerValue |
atAbsolute(int absoluteValue)Creates an |
final Parallax.PropertyMarkerValue |
atFraction(float fractionOfMaxValue)Creates an |
final Parallax.PropertyMarkerValue |
atMax()Creates an |
final Parallax.PropertyMarkerValue |
atMin()Creates an |
final Integer |
|
final int |
getIndex() |
final int |
Fast version of get() method that returns a primitive int value of the Property. |
final void |
|
final void |
Fast version of set() method that takes a primitive int value into the Property. |
Inherited methods |
|---|
Constants
UNKNOWN_AFTER
public static final int UNKNOWN_AFTER = 2147483647
Property value is unknown and it's larger than getMaxValue. For example if a child is not created and after the last visible child of RecyclerView.
UNKNOWN_BEFORE
public static final int UNKNOWN_BEFORE = -2147483648
Property value is unknown and it's smaller than minimal value of Parallax. For example if a child is not created and before the first visible child of RecyclerView.
Public constructors
Public methods
at
public final Parallax.PropertyMarkerValue at(int offsetValue, float fractionOfMaxParentVisibleSize)
Create an PropertyMarkerValue object by multiplying the fraction with getMaxValue and adding offsetValue to it.
| Parameters | |
|---|---|
int offsetValue |
An offset integer value to be added to marker value. |
float fractionOfMaxParentVisibleSize |
0 to 1 fraction to multiply with |
| Returns | |
|---|---|
Parallax.PropertyMarkerValue |
A new |
atAbsolute
public final Parallax.PropertyMarkerValue atAbsolute(int absoluteValue)
Creates an PropertyMarkerValue object for the absolute marker value.
| Parameters | |
|---|---|
int absoluteValue |
The integer marker value. |
| Returns | |
|---|---|
Parallax.PropertyMarkerValue |
A new |
atFraction
public final Parallax.PropertyMarkerValue atFraction(float fractionOfMaxValue)
Creates an PropertyMarkerValue object for a fraction of getMaxValue.
| Parameters | |
|---|---|
float fractionOfMaxValue |
0 to 1 fraction to multiply with |
| Returns | |
|---|---|
Parallax.PropertyMarkerValue |
A new |
atMax
public final Parallax.PropertyMarkerValue atMax()
Creates an PropertyMarkerValue object for the marker value representing getMaxValue.
| Returns | |
|---|---|
Parallax.PropertyMarkerValue |
A new |
atMin
public final Parallax.PropertyMarkerValue atMin()
Creates an PropertyMarkerValue object for the marker value representing 0.
| Returns | |
|---|---|
Parallax.PropertyMarkerValue |
A new |