# Parallax.FloatProperty

Artifact: [androidx.leanback:leanback](https://developer.android.com/jetpack/androidx/releases/leanback) [View Source](https://cs.android.com/search?q=file:androidx/leanback/widget/Parallax.java+class:androidx.leanback.widget.Parallax.FloatProperty) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

*** ** * ** ***


```
public class Parallax.FloatProperty extends Property<Parallax, Float>
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [android.util.Property](https://developer.android.com/reference/android/util/Property.html)\<[Parallax](https://developer.android.com/reference/androidx/leanback/widget/Parallax), [Float](https://developer.android.com/reference/java/lang/Float.html)\> ||
|   | ↳ | [androidx.leanback.widget.Parallax.FloatProperty](https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty) |

*** ** * ** ***

FloatProperty provide access to an index based integer type property inside `https://developer.android.com/reference/androidx/leanback/widget/Parallax`. The FloatProperty typically represents UI element position inside `https://developer.android.com/reference/androidx/leanback/widget/Parallax`.

## Summary

| ### Constants |
|---|---|
| `static final float` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#UNKNOWN_AFTER() = 3.4028235E38f` Property value is unknown and it's larger than `https://developer.android.com/reference/androidx/leanback/widget/Parallax#getMaxValue()`. |
| `static final float` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#UNKNOWN_BEFORE() = -3.4028235E38f` Property value is unknown and it's smaller than minimal value of Parallax. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#FloatProperty(java.lang.String,int)(https://developer.android.com/reference/java/lang/String.html name, int index)` Constructor. |

| ### Public methods |
|---|---|
| `final https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#at(float,float)(float offsetValue, float fractionOfMaxParentVisibleSize)` Create an `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object by multiplying the fraction with `https://developer.android.com/reference/androidx/leanback/widget/Parallax#getMaxValue()` and adding offsetValue to it. |
| `final https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#atAbsolute(float)(float markerValue)` Creates an `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object for the absolute marker value. |
| `final https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#atFraction(float)(float fractionOfMaxParentVisibleSize)` Creates an `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object for a fraction of `https://developer.android.com/reference/androidx/leanback/widget/Parallax#getMaxValue()`. |
| `final https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#atMax()()` Creates an `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object for the marker value representing `https://developer.android.com/reference/androidx/leanback/widget/Parallax#getMaxValue()`. |
| `final https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#atMin()()` Creates an `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object for the marker value representing 0. |
| `final https://developer.android.com/reference/java/lang/Float.html` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#get(androidx.leanback.widget.Parallax)(https://developer.android.com/reference/androidx/leanback/widget/Parallax object)` |
| `final int` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#getIndex()()` |
| `final float` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#getValue(androidx.leanback.widget.Parallax)(https://developer.android.com/reference/androidx/leanback/widget/Parallax object)` Fast version of get() method that returns a primitive int value of the Property. |
| `final void` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#set(androidx.leanback.widget.Parallax,java.lang.Float)(https://developer.android.com/reference/androidx/leanback/widget/Parallax object, https://developer.android.com/reference/java/lang/Float.html value)` |
| `final void` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax.FloatProperty#setValue(androidx.leanback.widget.Parallax,float)(https://developer.android.com/reference/androidx/leanback/widget/Parallax object, float value)` Fast version of set() method that takes a primitive float value into the Property. |

### Inherited methods

From [android.util.Property](https://developer.android.com/reference/android/util/Property.html) `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/util/Property.html#getName()()` `https://developer.android.com/reference/java/lang/Class.html<V>` `https://developer.android.com/reference/android/util/Property.html#getType()()` `boolean` `https://developer.android.com/reference/android/util/Property.html#isReadOnly()()` `static https://developer.android.com/reference/android/util/Property.html<T, V>` `<T, V> https://developer.android.com/reference/android/util/Property.html#of(java.lang.Class&lt;T&gt;, java.lang.Class&lt;V&gt;, java.lang.String)(https://developer.android.com/reference/java/lang/Class.html<T> hostType, https://developer.android.com/reference/java/lang/Class.html<V> valueType, https://developer.android.com/reference/java/lang/String.html name)`

## Constants

### UNKNOWN_AFTER

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public static final float UNKNOWN_AFTER = 3.4028235E38f
```

Property value is unknown and it's larger than `https://developer.android.com/reference/androidx/leanback/widget/Parallax#getMaxValue()`. For example if a child is not created and after the last visible child of RecyclerView.

### UNKNOWN_BEFORE

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public static final float UNKNOWN_BEFORE = -3.4028235E38f
```

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](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public FloatProperty(String name, int index)
```

Constructor.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html name` | Name of this Property. |
| `int index` | Index of this Property inside `https://developer.android.com/reference/androidx/leanback/widget/Parallax`. |

## Public methods

### at

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public final Parallax.PropertyMarkerValue at(float offsetValue, float fractionOfMaxParentVisibleSize)
```

Create an `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object by multiplying the fraction with `https://developer.android.com/reference/androidx/leanback/widget/Parallax#getMaxValue()` and adding offsetValue to it.

| Parameters |
|---|---|
| `float offsetValue` | An offset float value to be added to marker value. |
| `float fractionOfMaxParentVisibleSize` | 0 to 1 fraction to multiply with `https://developer.android.com/reference/androidx/leanback/widget/Parallax#getMaxValue()` for the marker value. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` | A new `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object. |

### atAbsolute

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public final Parallax.PropertyMarkerValue atAbsolute(float markerValue)
```

Creates an `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object for the absolute marker value.

| Parameters |
|---|---|
| `float markerValue` | The float marker value. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` | A new `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object. |

### atFraction

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public final Parallax.PropertyMarkerValue atFraction(float fractionOfMaxParentVisibleSize)
```

Creates an `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object for a fraction of `https://developer.android.com/reference/androidx/leanback/widget/Parallax#getMaxValue()`.

| Parameters |
|---|---|
| `float fractionOfMaxParentVisibleSize` | 0 to 1 fraction to multiply with `https://developer.android.com/reference/androidx/leanback/widget/Parallax#getMaxValue()` for the marker value. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` | A new `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object. |

### atMax

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public final Parallax.PropertyMarkerValue atMax()
```

Creates an `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object for the marker value representing `https://developer.android.com/reference/androidx/leanback/widget/Parallax#getMaxValue()`.

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` | A new `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object. |

### atMin

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public final Parallax.PropertyMarkerValue atMin()
```

Creates an `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object for the marker value representing 0.

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` | A new `https://developer.android.com/reference/androidx/leanback/widget/Parallax.PropertyMarkerValue` object. |

### get

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public final Float get(Parallax object)
```

### getIndex

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public final int getIndex()
```

| Returns |
|---|---|
| `int` | Index of this Property in `https://developer.android.com/reference/androidx/leanback/widget/Parallax`. |

### getValue

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public final float getValue(Parallax object)
```

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/Parallax object` | The Parallax object that owns this Property. |

| Returns |
|---|---|
| `float` | Float value of the Property. |

### set

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public final void set(Parallax object, Float value)
```

### setValue

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
public final void setValue(Parallax object, float value)
```

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/Parallax object` | The Parallax object that owns this Property. |
| `float value` | Float value of the Property. |