LabelFormatter

public interface LabelFormatter

com.google.android.material.slider.LabelFormatter
BasicLabelFormatter 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). 


Interface definition for applying custom formatting to the text displayed inside the bubble shown when a slider is used in discrete mode.

Summary

Public methods

abstract String getFormattedValue(float value)

Constants

LABEL_FLOATING

public static final int LABEL_FLOATING

Constant Value: 0 (0x00000000)

LABEL_GONE

public static final int LABEL_GONE

Constant Value: 2 (0x00000002)

LABEL_VISIBLE

public static final int LABEL_VISIBLE

Constant Value: 3 (0x00000003)

LABEL_WITHIN_BOUNDS

public static final int LABEL_WITHIN_BOUNDS

Constant Value: 1 (0x00000001)

Public methods

getFormattedValue

public abstract String getFormattedValue (float value)

Parameters
value float

Returns
String