Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

LabelVisibilityMode

public abstract @interface LabelVisibilityMode
implements Annotation

com.google.android.material.bottomnavigation.LabelVisibilityMode


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 LABEL_VISIBILITY_SELECTED sets the label to only show when selected, setting it to LABEL_VISIBILITY_LABELED sets the label to always show, and LABEL_VISIBILITY_UNLABELED sets the label to never show.

Setting the label visibility mode to 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

int LABEL_VISIBILITY_AUTO

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

int LABEL_VISIBILITY_LABELED

Label is shown on all navigation items.

int LABEL_VISIBILITY_SELECTED

Label is shown on the selected navigation item.

int LABEL_VISIBILITY_UNLABELED

Label is not shown on any navigation items.

Inherited methods

From interface java.lang.annotation.Annotation

Constants

LABEL_VISIBILITY_AUTO

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

int LABEL_VISIBILITY_LABELED

Label is shown on all navigation items.

Constant Value: 1 (0x00000001)

LABEL_VISIBILITY_SELECTED

int LABEL_VISIBILITY_SELECTED

Label is shown on the selected navigation item.

Constant Value: 0 (0x00000000)

LABEL_VISIBILITY_UNLABELED

int LABEL_VISIBILITY_UNLABELED

Label is not shown on any navigation items.

Constant Value: 2 (0x00000002)