Follow on Google News News By Tag Industry News News By Location Country(s) Industry News
Follow on Google News | How to build Android Material Design Bottom Navigation Part 2In the previous tutorial we discussed Android Material Design Bottom Navigation and you can check our Android Material Design Series from here.
By: Android Gifts In the previous tutorial we discussed Android Material Design Bottom Navigation and you can check our Android Material Design Series from here. In this tutorial we will continue on the first Android project we started and implement Bottom Navigation with consists of four items. . In Android Studio, create a new activity, select Empty Activity and lets name FourButtonsActivity In the activity XML file put the following code which holds a frameLayout to hold the Fragment content Now we need to instantiate the Bottom Navigation in our activity class and set the four tabs with icons and labels through this code also attach our Fragments to the Bottom Navigation Note: You can download all icons used in the App through this link, Download and extract it path_to_app_ // Make a Badge for the first tab, with red background color and a value of "4". BottomBarBadge unreadMessages= // Control the badge's visibility unreadMessages.show(); //unreadMessages.hide(); // Change the displayed count for this badge. //unreadMessages.setCount( // Change the show / hide animation duration. unreadMessages.setAnimationDuration( // If you want the badge be shown always after unselecting the tab that contains it. //unreadMessages.setAutoShowAfterUnSelection( End
Account Email Address Account Phone Number Disclaimer Report Abuse
|
|