Stay organized with collections
Save and categorize content based on your preferences.
public
final
class
BasicLabelFormatter
extends Object
implements
LabelFormatter
java.lang.Object
|
↳ |
com.google.android.material.slider.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).
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
|
Public constructors
public BasicLabelFormatter ()
Public methods
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 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# BasicLabelFormatter\n\nSummary: [Inherited Constants](#inhconstants) \\| [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nBasicLabelFormatter\n===================\n\n\n`\npublic\n\nfinal\n\nclass\nBasicLabelFormatter\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\nimplements\n\n`[LabelFormatter](/reference/com/google/android/material/slider/LabelFormatter)`\n\n\n`\n\n|---|--------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.google.android.material.slider.BasicLabelFormatter |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA simple implementation of the [LabelFormatter](/reference/com/google/android/material/slider/LabelFormatter) interface, that limits the number\ndisplayed inside a discrete slider's bubble to three digits, and a single-character suffix that\ndenotes magnitude (e.g.: 1.5K, 2.2M, 1.3B, 2T).\n\nSummary\n-------\n\n| ### Inherited constants |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| From interface [com.google.android.material.slider.LabelFormatter](/reference/com/google/android/material/slider/LabelFormatter) |-------|---------------------------------------------------------------------------------------------------------| | `int` | [LABEL_FLOATING](/reference/com/google/android/material/slider/LabelFormatter#LABEL_FLOATING) | | `int` | [LABEL_GONE](/reference/com/google/android/material/slider/LabelFormatter#LABEL_GONE) | | `int` | [LABEL_VISIBLE](/reference/com/google/android/material/slider/LabelFormatter#LABEL_VISIBLE) | | `int` | [LABEL_WITHIN_BOUNDS](/reference/com/google/android/material/slider/LabelFormatter#LABEL_WITHIN_BOUNDS) | |\n\n| ### Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[BasicLabelFormatter](/reference/com/google/android/material/slider/BasicLabelFormatter#BasicLabelFormatter())`() ` |\n\n| ### Public methods ||\n|-----------|------------------------------------------------------------------------------------------------------------------------------------|\n| ` String` | ` `[getFormattedValue](/reference/com/google/android/material/slider/BasicLabelFormatter#getFormattedValue(float))`(float value) ` |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n| From interface ` `[com.google.android.material.slider.LabelFormatter](/reference/com/google/android/material/slider/LabelFormatter)` ` |--------------------|-------------------------------------------------------------------------------------------------------------------------------| | ` abstract String` | ` `[getFormattedValue](/reference/com/google/android/material/slider/LabelFormatter#getFormattedValue(float))`(float value) ` | ||\n\nPublic constructors\n-------------------\n\n### BasicLabelFormatter\n\n```\npublic BasicLabelFormatter ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### getFormattedValue\n\n```\npublic String getFormattedValue (float value)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|----------------|\n| `value` | `float` \u003cbr /\u003e |\n\n| Returns ||\n|----------|--------|\n| `String` | \u003cbr /\u003e |"]]