# LabelVisibilityMode

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/bottomnavigation/LabelVisibilityMode.java)

*** ** * ** ***


```
@Retention(value = RetentionPolicy.SOURCE)
public annotation LabelVisibilityMode
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This annotation is deprecated.**   
>
> To set the label visibility mode, see:
>
> com.google.android.material.navigation.NavigationBarView.setLabelVisibilityMode

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 `https://developer.android.com/reference/com/google/android/material/navigation/NavigationBarView#LABEL_VISIBILITY_SELECTED()` sets the label to only show when selected, setting it to `https://developer.android.com/reference/com/google/android/material/navigation/NavigationBarView#LABEL_VISIBILITY_LABELED()` sets the label to always show, and `https://developer.android.com/reference/com/google/android/material/navigation/NavigationBarView#LABEL_VISIBILITY_UNLABELED()` sets the label to never show.

Setting the label visibility mode to `https://developer.android.com/reference/com/google/android/material/navigation/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

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/com/google/android/material/bottomnavigation/LabelVisibilityMode#LABEL_VISIBILITY_AUTO() = -1` Label behaves as "labeled" when there are 3 items or less, or "selected" when there are 4 items or more. |
| `static final int` | `https://developer.android.com/reference/com/google/android/material/bottomnavigation/LabelVisibilityMode#LABEL_VISIBILITY_LABELED() = 1` Label is shown on all navigation items. |
| `static final int` | `https://developer.android.com/reference/com/google/android/material/bottomnavigation/LabelVisibilityMode#LABEL_VISIBILITY_SELECTED() = 0` Label is shown on the selected navigation item. |
| `static final int` | `https://developer.android.com/reference/com/google/android/material/bottomnavigation/LabelVisibilityMode#LABEL_VISIBILITY_UNLABELED() = 2` Label is not shown on any navigation items. |

## Constants

### LABEL_VISIBILITY_AUTO

```
public static final int LABEL_VISIBILITY_AUTO = -1
```

Label behaves as "labeled" when there are 3 items or less, or "selected" when there are 4 items or more.

### LABEL_VISIBILITY_LABELED

```
public static final int LABEL_VISIBILITY_LABELED = 1
```

Label is shown on all navigation items.

### LABEL_VISIBILITY_SELECTED

```
public static final int LABEL_VISIBILITY_SELECTED = 0
```

Label is shown on the selected navigation item.

### LABEL_VISIBILITY_UNLABELED

```
public static final int LABEL_VISIBILITY_UNLABELED = 2
```

Label is not shown on any navigation items.