BottomNavigation is an API similar to iOS's TabBarController.
This is a sample code that switches Fragment when selecting a tab in BottomNavigation.
The page I used as a reference.
BottomNavigationView入門
Bottom Navigation Android Example using Fragments