Stay organized with collections
Save and categorize content based on your preferences.
LabelVisibilityMode
public
abstract
@interface
LabelVisibilityMode
implements
Annotation
com.google.android.material.bottomnavigation.LabelVisibilityMode
|
This @interface is deprecated.
Use NavigationBarView.LABEL_VISIBILITY_AUTO instead.
Label visibility mode enum for bottom navigation.
The label visibility mode determines whether to show or hide labels in the navigation items.
Setting the label visibility mode to NavigationBarView.LABEL_VISIBILITY_SELECTED
sets
the label to only show when selected, setting it to NavigationBarView.LABEL_VISIBILITY_LABELED
sets the label to always show, and NavigationBarView.LABEL_VISIBILITY_UNLABELED
sets the label to never show.
Setting the label visibility mode to NavigationBarView.LABEL_VISIBILITY_AUTO
sets
the label to behave as "labeled" when there are 3 items or less, or "selected" when there are 4
items or more.
Summary
Inherited methods |
From interface
java.lang.annotation.Annotation
abstract
Class<? extends Annotation>
|
annotationType()
|
abstract
boolean
|
equals(Object arg0)
|
abstract
int
|
hashCode()
|
abstract
String
|
toString()
|
|
Constants
LABEL_VISIBILITY_AUTO
public static final int LABEL_VISIBILITY_AUTO
Label behaves as "labeled" when there are 3 items or less, or "selected" when there are 4 items
or more.
Constant Value:
-1
(0xffffffff)
LABEL_VISIBILITY_LABELED
public static final int LABEL_VISIBILITY_LABELED
Label is shown on all navigation items.
Constant Value:
1
(0x00000001)
LABEL_VISIBILITY_SELECTED
public static final int LABEL_VISIBILITY_SELECTED
Label is shown on the selected navigation item.
Constant Value:
0
(0x00000000)
LABEL_VISIBILITY_UNLABELED
public static final int LABEL_VISIBILITY_UNLABELED
Label is not shown on any navigation items.
Constant Value:
2
(0x00000002)
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-03-08 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-03-08 UTC."],[],[],null,["# LabelVisibilityMode\n\nSummary: [Constants](#constants) \\| [Inherited Methods](#inhmethods) \n\nLabelVisibilityMode\n===================\n\n\n`\npublic\n\n\nabstract\n@interface\nLabelVisibilityMode\n`\n\n\n`\n\n\nimplements\n\nAnnotation\n\n\n`\n\n|------------------------------------------------------------------|\n| com.google.android.material.bottomnavigation.LabelVisibilityMode |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This @interface is deprecated.** \n\nUse [NavigationBarView.LABEL_VISIBILITY_AUTO](/reference/com/google/android/material/navigation/NavigationBarView#LABEL_VISIBILITY_AUTO) instead.\n\nLabel visibility mode enum for bottom navigation.\n\nThe label visibility mode determines whether to show or hide labels in the navigation items.\nSetting the label visibility mode to [NavigationBarView.LABEL_VISIBILITY_SELECTED](/reference/com/google/android/material/navigation/NavigationBarView#LABEL_VISIBILITY_SELECTED) sets\nthe label to only show when selected, setting it to [NavigationBarView.LABEL_VISIBILITY_LABELED](/reference/com/google/android/material/navigation/NavigationBarView#LABEL_VISIBILITY_LABELED) sets the label to always show, and [NavigationBarView.LABEL_VISIBILITY_UNLABELED](/reference/com/google/android/material/navigation/NavigationBarView#LABEL_VISIBILITY_UNLABELED) sets the label to never show.\n\nSetting the label visibility mode to [NavigationBarView.LABEL_VISIBILITY_AUTO](/reference/com/google/android/material/navigation/NavigationBarView#LABEL_VISIBILITY_AUTO) sets\nthe label to behave as \"labeled\" when there are 3 items or less, or \"selected\" when there are 4\nitems or more.\n\nSummary\n-------\n\n| ### Constants ||\n|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | [LABEL_VISIBILITY_AUTO](/reference/com/google/android/material/bottomnavigation/LabelVisibilityMode#LABEL_VISIBILITY_AUTO) Label behaves as \"labeled\" when there are 3 items or less, or \"selected\" when there are 4 items or more. |\n| `int` | [LABEL_VISIBILITY_LABELED](/reference/com/google/android/material/bottomnavigation/LabelVisibilityMode#LABEL_VISIBILITY_LABELED) Label is shown on all navigation items. |\n| `int` | [LABEL_VISIBILITY_SELECTED](/reference/com/google/android/material/bottomnavigation/LabelVisibilityMode#LABEL_VISIBILITY_SELECTED) Label is shown on the selected navigation item. |\n| `int` | [LABEL_VISIBILITY_UNLABELED](/reference/com/google/android/material/bottomnavigation/LabelVisibilityMode#LABEL_VISIBILITY_UNLABELED) Label is not shown on any navigation items. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From interface ` java.lang.annotation.Annotation ` |-----------------------------------------|-------------------------| | ` abstract Class\u003c? extends Annotation\u003e` | ` annotationType() ` | | ` abstract boolean` | ` equals(Object arg0) ` | | ` abstract int` | ` hashCode() ` | | ` abstract String` | ` toString() ` | ||\n\nConstants\n---------\n\n### LABEL_VISIBILITY_AUTO\n\n```\npublic static final int LABEL_VISIBILITY_AUTO\n```\n\nLabel behaves as \"labeled\" when there are 3 items or less, or \"selected\" when there are 4 items\nor more.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n-1\n(0xffffffff)\n\n\n### LABEL_VISIBILITY_LABELED\n\n```\npublic static final int LABEL_VISIBILITY_LABELED\n```\n\nLabel is shown on all navigation items.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n1\n(0x00000001)\n\n\n### LABEL_VISIBILITY_SELECTED\n\n```\npublic static final int LABEL_VISIBILITY_SELECTED\n```\n\nLabel is shown on the selected navigation item.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n0\n(0x00000000)\n\n\n### LABEL_VISIBILITY_UNLABELED\n\n```\npublic static final int LABEL_VISIBILITY_UNLABELED\n```\n\nLabel is not shown on any navigation items.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n2\n(0x00000002)"]]