Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
NavigationView makes it very easy to make a good looking material design Navigation drawer. This NavigationView is used as the replacement of existing ListView, ExpandableListView and other that were used to create a navigation menu.
Here is the Material Design Support Library that provide an all new Widget, called as NavigationView .
compile ‘com.android.support:design:22.2.0
The advantage of using NavigationView over traditional approach is the ease in which menu can be created.
There are 2 ways to implement a NavigationView, we will see both the ways.
We are creating NavigationView at Design time.
All we need to do is:
i. Create layout for the Activity.
NavigationView is added as a child in the DrawerLayout where we want to display it.
activity_main.xml
ii. Creating Menu that is used as a menu to be displayed in NavigationMenu
NavigationMenu is just a simple menu that can be added in the view through XML or dynamically at the run time.
We have added customer_menu.xml as a menu that is displayed in the NavigationView by using app:menu property of NavigationView.
app:menu=”@menu/customer_menu”
customer_menu.xml
iii. Adding Header View for the Navigation View.
Another cool thing about NavigationView is support for the HeaderView. We can pass any custom header for our HeaderView of NavigationView.
app:headerLayout=”@layout/navigation_header_view”
navigation_header_view.xml
for Circle Image Library (Add the dependency mentioned below)
compile ‘de.hdodenhof:circleimageview:1.3.0’
iv. Time to intialize all our views in the activity where we want to display the NavigationView.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
All communication is done through a ticket system. I appreciate the regular almost daily updates of what is being worked on, and communicating changes or updates is easy through this system. Mobikul's response timeframe is quick.
Josh Arnold
Owner, Shop ATV Escape
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.