android.support.v4.widget.DrawerLayout.DrawerListener Java Examples

The following examples show how to use android.support.v4.widget.DrawerLayout.DrawerListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RxDrawer.java    From SeeWeather with Apache License 2.0 6 votes vote down vote up
public static Observable<Irrelevant> close(final DrawerLayout drawer) {
    return Observable.create(emitter -> {
        drawer.closeDrawer(GravityCompat.START);
        DrawerListener listener = new DrawerLayout.SimpleDrawerListener() {
            @Override
            public void onDrawerSlide(View drawerView, float slideOffset) {
                if (slideOffset < OFFSET_THRESHOLD) {
                    emitter.onNext(Irrelevant.INSTANCE);
                    emitter.onComplete();
                    drawer.removeDrawerListener(this);
                }
            }
        };
        drawer.addDrawerListener(listener);
    });
}
 
Example #2
Source File: ListenerProxy.java    From Folding-Android with Apache License 2.0 4 votes vote down vote up
public ListenerProxy(DrawerListener drawerListener,
		PanelSlideListener panelSlideListener) {
	mDrawerListener = drawerListener;
	mPanelSlideListener = panelSlideListener;
}
 
Example #3
Source File: ListenerProxy.java    From Folding-Android with Apache License 2.0 4 votes vote down vote up
public DrawerListener getDrawerListener() {
	return mDrawerListener;
}
 
Example #4
Source File: ListenerProxy.java    From Folding-Android with Apache License 2.0 4 votes vote down vote up
public void setDrawerListener(DrawerListener drawerListener) {
	this.mDrawerListener = drawerListener;
}