Java BottomNavigationView realizes the bottom navigation bar is very simple

Step 1: Create a page that belongs to him

insert image description here

Step 2: Add a custom Fragment, note that the id name should be the same as the one in the menu

insert image description here

Step 3: Add a new button

insert image description here

Step 4: app:labelVisibilityMode="labeled" Add to see the text content of the button

insert image description here

Step 5: Hide the title bar this.getSupportActionBar().hide();

insert image description here

Supongo que te gusta

Origin blog.csdn.net/m0_62491934/article/details/129246889
Recomendado
Clasificación