BasicLabelFormatter


Kotlin |Java

public final class BasicLabelFormatter implements LabelFormatter 


A simple implementation of the LabelFormatter interface, that limits the number displayed inside a discrete slider's bubble to three digits, and a single-character suffix that denotes magnitude (e.g.: 1.5K, 2.2M, 1.3B, 2T).

Summary

Public constructors

Public methods

String
getFormattedValue(float value)
static final int
static final int
static final int
static final int

Inherited Constants

From com.google.android.material.slider.LabelFormatter

Public constructors

BasicLabelFormatter

public BasicLabelFormatter()

Public methods

getFormattedValue

public String getFormattedValue(float value)

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026年05月14日 UTC.