Google 致力于为黑人社区推动种族平等。查看具体举措

LabelFormatter

public interface LabelFormatter

com.google.android.material.slider.LabelFormatter
Known Indirect Subclasses


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

Summary

Constants

int LABEL_FLOATING

int LABEL_GONE

int LABEL_WITHIN_BOUNDS

Public methods

abstract String getFormattedValue(float value)

Constants

LABEL_FLOATING

int LABEL_FLOATING

Constant Value: 0 (0x00000000)

LABEL_GONE

int LABEL_GONE

Constant Value: 2 (0x00000002)

LABEL_WITHIN_BOUNDS

int LABEL_WITHIN_BOUNDS

Constant Value: 1 (0x00000001)

Public methods

getFormattedValue

String getFormattedValue (float value)

Parameters
value float

Returns
String