How to build Android Material Design Bottom Navigation Part 2

In the previous tutorial we discussed Android Material Design Bottom Navigation and you can check our Android Material Design Series from here.
 
 
bottom_navigation_cover_2
bottom_navigation_cover_2
March 26, 2016 - PRLog -- Visit My blog to get the source code and complete tutorial (http://androidgifts.com/build-android-material-design-bottom-navigation-part-2/)

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_folder\app\src\main\res

// Make a Badge for the first tab, with red background color and a value of "4".
BottomBarBadge unreadMessages=bottomBar.makeBadgeForTabAt(1,"#E91E63",4);

// Control the badge's visibility
unreadMessages.show();
//unreadMessages.hide();

// Change the displayed count for this badge.
//unreadMessages.setCount(4);

// Change the show / hide animation duration.
unreadMessages.setAnimationDuration(200);

// If you want the badge be shown always after unselecting the tab that contains it.
//unreadMessages.setAutoShowAfterUnSelection(true);
End
Email:***@androidgifts.com Email Verified
Tags:Android, Material Design, Android Development
Industry:Computers
Location:India
Subject:Services
Account Email Address Verified     Account Phone Number Verified     Disclaimer     Report Abuse
Android Gifts PRs
Trending News
Most Viewed
Top Daily News



Like PRLog?
9K2K1K
Click to Share