This repository was archived by the owner on Apr 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 430
Home
neokree edited this page Dec 7, 2014
·
19 revisions
this is a simple wiki that show you all library functionality
A section is a simple element of your navigation drawer list. There are two type of section at this time:
- Text Section
- Text and Icon Section
Every section could have a notifications number.
There are two different lists where you can add your section:
- Top list (default list)
- Bottom List
It is a list used exclusively for About, Settings or other things like this.
// only text section, it opens an activity
public MaterialSection newSection(String title,Intent target)
// only text section, it opens a fragment
public MaterialSection newSection(String title,Fragment target)
// icon bitmap and text section, it opens an activity
public MaterialSection newSection(String title, Bitmap icon,Intent target)
// icon bitmap and text section, it opens a fragment
public MaterialSection newSection(String title, Bitmap icon,Fragment target)
// icon drawable and text section, it opens an activity
public MaterialSection newSection(String title, Drawable icon, Intent target)
// icon drawable and text section, it opens a fragment
public MaterialSection newSection(String title, Drawable icon, Fragment target)
// only text section, it opens an activity
public MaterialSection newBottomSection(String title,Intent target)
// only text section, it opens a fragment
public MaterialSection newBottomSection(String title,Fragment target)
// icon bitmap and text section, it opens an activity
public MaterialSection newBottomSection(String title, Bitmap icon,Intent target)
// icon bitmap and text section, it opens a fragment
public MaterialSection newBottomSection(String title, Bitmap icon,Fragment target)
// icon drawable and text section, it opens an activity
public MaterialSection newBottomSection(String title, Drawable icon, Intent target)
// icon drawable and text section, it opens a fragment
public MaterialSection newBottomSection(String title, Drawable icon, Fragment target)
int color = Color.parseColor("FFFFFF");
mySection.setSectionColor(color);
int number = 4;
mySection.setNotifications(number);
int notifications = mySection.getNotifications();
A separator (or divisor) is a simple grey line used for diversify group of sections.
@Override
public void init(Bundle savedInstanceState) {
this.addDivisor();
}
From your Activity:
// get toolbar
this.getToolbar();
// get Action Bar
this.getSupportActionBar();
From your Fragment:
// get toolbar
((MaterialNavigationDrawer)this.getActivity()).getToolbar();
// get action bar
this.getActivity().getSupportActionBar();
From your Activity:
this.getCurrentSection();
From your Fragment:
((MaterialNavigationDrawer)this.getActivity()).getCurrentSection();