Parallax.FloatProperty

class Parallax.FloatProperty : Property


FloatProperty provide access to an index based integer type property inside Parallax. The FloatProperty typically represents UI element position inside Parallax.

Summary

Constants

const Float
UNKNOWN_AFTER = 3.4028235E38f

Property value is unknown and it's larger than getMaxValue.

const Float
UNKNOWN_BEFORE = -3.4028235E38f

Property value is unknown and it's smaller than minimal value of Parallax.

Public constructors

FloatProperty(name: String!, index: Int)

Constructor.

Public functions

Parallax.PropertyMarkerValue!
at(offsetValue: Float, fractionOfMaxParentVisibleSize: Float)

Create an PropertyMarkerValue object by multiplying the fraction with getMaxValue and adding offsetValue to it.

Parallax.PropertyMarkerValue!
atAbsolute(markerValue: Float)

Creates an PropertyMarkerValue object for the absolute marker value.

Parallax.PropertyMarkerValue!
atFraction(fractionOfMaxParentVisibleSize: Float)

Creates an PropertyMarkerValue object for a fraction of getMaxValue.

Parallax.PropertyMarkerValue!

Creates an PropertyMarkerValue object for the marker value representing getMaxValue.

Parallax.PropertyMarkerValue!

Creates an PropertyMarkerValue object for the marker value representing 0.

Float!
get(object: Parallax!)
Int
Float
getValue(object: Parallax!)

Fast version of get() method that returns a primitive int value of the Property.

Unit
set(object: Parallax!, value: Float!)
Unit
setValue(object: Parallax!, value: Float)

Fast version of set() method that takes a primitive float value into the Property.

Inherited functions

From android.util.Property
String!
Class<V!>!
Boolean
java-static Property<T!, V!>!
<T, V> of(hostType: Class<T!>!, valueType: Class<V!>!, name: String!)

Constants

UNKNOWN_AFTER

Added in 1.1.0
const val UNKNOWN_AFTER = 3.4028235E38f: Float

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

Added in 1.1.0
const val UNKNOWN_BEFORE = -3.4028235E38f: Float

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

FloatProperty

Added in 1.1.0
FloatProperty(name: String!, index: Int)

Constructor.

Parameters
name: String!

Name of this Property.

index: Int

Index of this Property inside Parallax.

Public functions

at

Added in 1.1.0
fun at(offsetValue: Float, fractionOfMaxParentVisibleSize: Float): Parallax.PropertyMarkerValue!

Create an PropertyMarkerValue object by multiplying the fraction with getMaxValue and adding offsetValue to it.

Parameters
offsetValue: Float

An offset float value to be added to marker value.

fractionOfMaxParentVisibleSize: Float

0 to 1 fraction to multiply with getMaxValue for the marker value.

atAbsolute

Added in 1.1.0
fun atAbsolute(markerValue: Float): Parallax.PropertyMarkerValue!

Creates an PropertyMarkerValue object for the absolute marker value.

Parameters
markerValue: Float

The float marker value.

atFraction

Added in 1.1.0
fun atFraction(fractionOfMaxParentVisibleSize: Float): Parallax.PropertyMarkerValue!

Creates an PropertyMarkerValue object for a fraction of getMaxValue.

Parameters
fractionOfMaxParentVisibleSize: Float

0 to 1 fraction to multiply with getMaxValue for the marker value.

atMax

Added in 1.1.0
fun atMax(): Parallax.PropertyMarkerValue!

Creates an PropertyMarkerValue object for the marker value representing getMaxValue.

atMin

Added in 1.1.0
fun atMin(): Parallax.PropertyMarkerValue!

Creates an PropertyMarkerValue object for the marker value representing 0.

get

Added in 1.1.0
fun get(object: Parallax!): Float!

getIndex

Added in 1.1.0
fun getIndex(): Int
Returns
Int

Index of this Property in Parallax.

getValue

Added in 1.1.0
fun getValue(object: Parallax!): Float

Fast version of get() method that returns a primitive int value of the Property.

Parameters
object: Parallax!

The Parallax object that owns this Property.

Returns
Float

Float value of the Property.

set

Added in 1.1.0
fun set(object: Parallax!, value: Float!): Unit

setValue

Added in 1.1.0
fun setValue(object: Parallax!, value: Float): Unit

Fast version of set() method that takes a primitive float value into the Property.

Parameters
object: Parallax!

The Parallax object that owns this Property.

value: Float

Float value of the Property.