Posts

Showing posts with the label UI

Bottom Navigation using design Library in Android - Kotlin

Image
Introduction: Let's implement BottomNavigationView in our layout using Design Support Library. First, we have to go through the factors like, when  and how to use that. When to use? As per Material Design specs, the following criteria is there: (a) Tabs (TabLayout) - Should be used when there are two navigations. (b) Bottom Navigation - Should be used when there are 3 to 5 navigations. (c) Navigation Drawer - Should be used when there are 6 or more navigations. Also to remember that, Viewpager shouldn't be used with BottomNavigationView. You can read the complete design specs, here . How to use? BottomNavigationView have to be added  at the bottom of the screen. Also, the following are some of the important attributes: app:itemBackground - to apply background color  app:itemTextColor - to apply the color for the text of BottomNavigation item. app:itemIconTint - to apply the color for the icon of BottomNavigation item. app:menu