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
The flexible, easy to use, all in one drawer library for your Android project.
Yes that’s true. But there are still shortage of community which provide resources and relavent information about this Material Drawer Library.
In this blog We are going to implement this library in our project. And later we will see how we can tailor the flow as per our application requirement.
You can download the complete sample application from here.
note: add transitive dependencies by setting transitive = true for the material drawer dependency. This will add all the relevant dependency required by the material drawer library.
Also there are some other dependency that we can add to speed up the implementation:
compile ‘com.mikepenz:google-material-typeface:[email protected]’ , compile ‘com.mikepenz:fontawesome-typeface:[email protected]’ are the GitHub libraries that maintain Google recommended material based icons. This will boost our development process without worrying about the icon required.
We have used Picasso as a image loading and caching library.
Note: Image loading is done in picasso but it can be change to any library.
Note: IProfile is the interface that can be used to display multiple type of profiles based on the requirement.
Here we have passed the ProfileDrawerItem object which is used to display the profile as a drawer item of the Drawer.
We can set the icon from URL ,Drawable , DrawableRes or Bitmap.
Here Identifier is used to identifying a particular element. This is usually used OnDrawerItemClickListener to identify which drawer item has been clicked.
Note: AccountHeaderBuilder class allow up to create a header of the drawer. We can create our custom header or use among the available header files.
You can change the header by using withAccountHeader(R.layout.myHeaderView). Also to set compact header layout use withCompactStyle(true).
Here withOnAccountHeaderListener all the profile changed events related to AccountHeader are managed.
Note: Here we have added multiple type of drawer items namely PrimaryDrawerItem, SectionDrawerItem, ExpandableDrawerItem and like that. Check the main drawer for all types of Drawer items provideded by the Material Drawer library
Here withOnDrawerItemClickListener handles all the drawer items click events related to Drawer.
Also, .withAccountHeader(headerResult) automatically sets the AccountHeader that we created earlier for the header.
That’s all folks. Stay updated.
Important Links:
https://github.com/mikepenz/MaterialDrawer
https://gitter.im/mikepenz/MaterialDrawer
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.
Collapsing toolbar with crossfade, searchbar and a extended actionbutton, plus the latest slider with pinch zoom which I implemented early at dawn before I finally went to sleep. 🙂
I needed to overcome the limitations of a fairly recent obsession: the webview, that I was forced to approach material design beginning with this drawer.
I’m only two weeks in Android development, but I know java for quit a long time and I haven’t tried it for years. I quit java when I realized that there was yet little support for distribution of java enabled phones around 2007 at least in my country, just about the time when Android was yet a company (which I haven’t heard yet back then) and the expense to do it was too high.
But today, Android Studio provides many better promises for android applications than what was then available for mobile devices in Netbeans, even years later, while PHP and javascript was my haven.
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.