# DynamicBuilders.DynamicFloat.FloatFormatter

Artifact: [androidx.wear.protolayout:protolayout-expression](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/expression/DynamicBuilders.java+class:androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat.FloatFormatter) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
public class DynamicBuilders.DynamicFloat.FloatFormatter
```

<br />

*** ** * ** ***

Allows formatting `https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat` into a `https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicString`.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat.FloatFormatter.Builder` Builder to create `https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat.FloatFormatter` objects. |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int` | `https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat.FloatFormatter#getMaxFractionDigits()()` Returns the maximum number of digits allowed in the fraction portion of a number. |
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int` | `https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat.FloatFormatter#getMinFractionDigits()()` Returns the minimum number of digits allowed in the fraction portion of a number. |
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int` | `https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat.FloatFormatter#getMinIntegerDigits()()` Returns the minimum number of digits allowed in the integer portion of a number. |
| `boolean` | `https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat.FloatFormatter#isGroupingUsed()()` Returns whether digit grouping is used or not. |

## Public methods

### getMaxFractionDigits

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @IntRange(from = 0) int getMaxFractionDigits()
```

Returns the maximum number of digits allowed in the fraction portion of a number.

### getMinFractionDigits

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @IntRange(from = 0) int getMinFractionDigits()
```

Returns the minimum number of digits allowed in the fraction portion of a number.

### getMinIntegerDigits

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @IntRange(from = 0) int getMinIntegerDigits()
```

Returns the minimum number of digits allowed in the integer portion of a number.

### isGroupingUsed

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public boolean isGroupingUsed()
```

Returns whether digit grouping is used or not.