forked from NikolaDespotoski/DrawerLayoutEdgeToggle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.md.txt
27 lines (20 loc) · 1.14 KB
/
README.md.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#Description:
DrawerLayoutEdgeToggle is library that adds visible handle to the DrawerLayout. It allows you to slide the handle to open/close the DrawerLayout, or use click event to open/close the DrawerLayout. It is independent of the ActionBar home indicator as it is seen in ActionBarDrawerToggle.
#Usage:
1. Import the library project and set it to your project.
<pre><code>boolean keepShadowOnHandle = true;
mDrawerToggle = new DrawerLayoutEdgeToggle(this, mDrawerLayout, R.drawable.drawer_open, R.drawable.drawer_close,Gravity.LEFT, keepShadowOnHandle){
@Override
public void onDrawerClosed(View arg0) {
super.onDrawerClosed(arg0); //must call super
}
@Override
public void onDrawerOpened(View arg0) {
super.onDrawerOpened(arg0); //must call super
}
@Override
public void onDrawerSlide(View arg0, float slideOffset) {
super.onDrawerSlide(arg0, slideOffset); //must call super
}};
mDrawerLayout.setDrawerListener(mDrawerToggle);.
</code></pre>