Java Code Examples for android.support.v4.widget.DrawerLayout#STATE_IDLE

The following examples show how to use android.support.v4.widget.DrawerLayout#STATE_IDLE . 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: DrawerListenerAdapter.java    From android-transition with Apache License 2.0 6 votes vote down vote up
@Override
public void onDrawerStateChanged(int state) {
    mDrawerToggle.onDrawerStateChanged(state);
    switch (state) {
        case DrawerLayout.STATE_DRAGGING:
        case DrawerLayout.STATE_SETTLING:
            startTransition();
            break;
        case DrawerLayout.STATE_IDLE:
            stopTransition();
            break;
    }

    if (mDrawerListener != null) {
        mDrawerListener.onDrawerStateChanged(state);
    }
}
 
Example 2
Source File: ObligatoryDrawerListener.java    From fogger with Apache License 2.0 5 votes vote down vote up
@Override
public synchronized void onDrawerStateChanged(int drawerState) {
    if (drawerState == DrawerLayout.STATE_DRAGGING && !blurringTaskAlreadyRun) {
        prepareToBluringProcess();
    } else if (drawerState == DrawerLayout.STATE_IDLE && lastSlideOffset == DRAWER_CLOSED_OFFSET) {
        reset();
    }

    if (hasUserDrawerListener()) {
        userDrawerListener.onDrawerStateChanged(drawerState);
    }
}
 
Example 3
Source File: SmoothNavigationToggle.java    From BuildmLearn-Toolkit-Android with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void onDrawerStateChanged(int newState) {
    if (runnable != null && newState == DrawerLayout.STATE_IDLE) {
        runnable.run();
        runnable = null;
    }
}
 
Example 4
Source File: BlurActionBarDrawerToggle.java    From UltimateAndroid with Apache License 2.0 5 votes vote down vote up
@Override
public void onDrawerStateChanged(int newState) {
    super.onDrawerStateChanged(newState);

    // "fake" sliding detection
    if (newState == DrawerLayout.STATE_IDLE
            && !isOpening) {

        handleRecycle();
    }
}
 
Example 5
Source File: BlurActionBarDrawerToggle.java    From UltimateAndroid with Apache License 2.0 5 votes vote down vote up
@Override
public void onDrawerStateChanged(int newState) {
    super.onDrawerStateChanged(newState);

    // "fake" sliding detection
    if (newState == DrawerLayout.STATE_IDLE
            && !isOpening) {

        handleRecycle();
    }
}
 
Example 6
Source File: BlurActionBarDrawerToggle.java    From BlurNavigationDrawer with Apache License 2.0 5 votes vote down vote up
@Override
public void onDrawerStateChanged(int newState) {
    super.onDrawerStateChanged(newState);

    // "fake" sliding detection
    if (newState == DrawerLayout.STATE_IDLE
            && !isOpening) {

        handleRecycle();
    }
}
 
Example 7
Source File: BlurActionBarDrawerToggle.java    From BlurNavigationDrawer with Apache License 2.0 5 votes vote down vote up
@Override
public void onDrawerStateChanged(int newState) {
    super.onDrawerStateChanged(newState);

    // "fake" sliding detection
    if (newState == DrawerLayout.STATE_IDLE
            && !isOpening) {

        handleRecycle();
    }
}