# PickerColumn

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

*** ** * ** ***

<br />

```
class PickerColumn
```

<br />

*** ** * ** ***

Picker column class used by `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/Picker`, defines a contiguous value ranges and associated labels. A PickerColumn has a minValue and maxValue to choose between. The Picker column has a current value. The labels can be dynamically generated from value by `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#setLabelFormat(java.lang.String)` or a list of static labels set by `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#setStaticLabels(java.lang.CharSequence[])`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#PickerColumn()()` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#getCount()()` Get total items count between minValue and maxValue. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#getCurrentValue()()` Returns current value of the Column. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html!` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#getLabelFor(int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Get a label for value. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#getLabelFormat()()` Return string format (see `https://developer.android.com/reference/java/lang/String.html#format(java.lang.String, java.lang.Object...)`) to display label for value. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#getMaxValue()()` Returns maximum value of the Column. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#getMinValue()()` Returns minimal value of the Column. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#getStaticLabels()()` Returns static labels for each value, minValue maps to labels\[0\], maxValue maps to labels\[labels.length - 1\]. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#setCurrentValue(int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets current value of the Column. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#setLabelFormat(java.lang.String)(labelFormat: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Set string format (see `https://developer.android.com/reference/java/lang/String.html#format(java.lang.String, java.lang.Object...)`) to display label for an integer value. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#setMaxValue(int)(maxValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets maximum value of the Column. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#setMinValue(int)(minValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets minimal value of the Column. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#setStaticLabels(java.lang.CharSequence[])(labels: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html!>!)` Set static labels for each value, minValue maps to labels\[0\], maxValue maps to labels\[labels.length - 1\]. |

## Public constructors

### PickerColumn

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

```
PickerColumn()
```

## Public functions

### getCount

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

```
fun getCount(): Int
```

Get total items count between minValue and maxValue.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Total items count between minValue and maxValue. |

### getCurrentValue

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

```
fun getCurrentValue(): Int
```

Returns current value of the Column.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Current value of the Column. |

### getLabelFor

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

```
fun getLabelFor(value: Int): CharSequence!
```

Get a label for value. The label can be static `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#setStaticLabels(java.lang.CharSequence[])` or dynamically generated `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#setLabelFormat(java.lang.String)` when static labels is null.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Value between minValue and maxValue. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html!` | Label for the value. |

### getLabelFormat

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

```
fun getLabelFormat(): String!
```

Return string format (see `https://developer.android.com/reference/java/lang/String.html#format(java.lang.String, java.lang.Object...)`) to display label for value.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | String format to display label for value. |

### getMaxValue

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

```
fun getMaxValue(): Int
```

Returns maximum value of the Column.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Maximum value of the Column. |

### getMinValue

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

```
fun getMinValue(): Int
```

Returns minimal value of the Column.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Minimal value of the Column. |

### getStaticLabels

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

```
fun getStaticLabels(): Array<CharSequence!>!
```

Returns static labels for each value, minValue maps to labels\[0\], maxValue maps to labels\[labels.length - 1\]. When null, `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#getLabelFormat()` will be used.

### setCurrentValue

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

```
fun setCurrentValue(value: Int): Unit
```

Sets current value of the Column.

### setLabelFormat

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

```
fun setLabelFormat(labelFormat: String!): Unit
```

Set string format (see `https://developer.android.com/reference/java/lang/String.html#format(java.lang.String, java.lang.Object...)`) to display label for an integer value. `https://developer.android.com/reference/kotlin/androidx/leanback/widget/picker/PickerColumn#setStaticLabels(java.lang.CharSequence[])` overrides the format.

| Parameters |
|---|---|
| `labelFormat: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | String format to display label for value between minValue and maxValue. |

### setMaxValue

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

```
fun setMaxValue(maxValue: Int): Unit
```

Sets maximum value of the Column.

| Parameters |
|---|---|
| `maxValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | New maximum value to set. |

### setMinValue

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

```
fun setMinValue(minValue: Int): Unit
```

Sets minimal value of the Column.

| Parameters |
|---|---|
| `minValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | New minimal value to set. |

### setStaticLabels

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

```
fun setStaticLabels(labels: Array<CharSequence!>!): Unit
```

Set static labels for each value, minValue maps to labels\[0\], maxValue maps to labels\[labels.length - 1\].

| Parameters |
|---|---|
| `labels: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html!>!` | Static labels for each value between minValue and maxValue. |