Example usage for android.app ActionBar dispatchMenuVisibilityChanged

List of usage examples for android.app ActionBar dispatchMenuVisibilityChanged

Introduction

In this page you can find the example usage for android.app ActionBar dispatchMenuVisibilityChanged.

Prototype

public void dispatchMenuVisibilityChanged(boolean visible) 

Source Link

Usage

From source file:android.support.v7.app.AppCompatDelegateImplV7.java

@Override
boolean onMenuOpened(final int featureId, Menu menu) {
    if (featureId == FEATURE_ACTION_BAR) {
        ActionBar ab = getSupportActionBar();
        if (ab != null) {
            ab.dispatchMenuVisibilityChanged(true);
        }/*from ww w .j av a  2  s .  c  o  m*/
        return true;
    }
    return false;
}

From source file:android.support.v7.app.AppCompatDelegateImplV7.java

@Override
boolean onPanelClosed(final int featureId, Menu menu) {
    if (featureId == FEATURE_ACTION_BAR) {
        ActionBar ab = getSupportActionBar();
        if (ab != null) {
            ab.dispatchMenuVisibilityChanged(false);
        }//from   w w w.  ja v a  2s  .c  o  m
        return true;
    } else if (featureId == FEATURE_OPTIONS_PANEL) {
        // Make sure that the options panel is closed. This is mainly used when we're using a
        // ToolbarActionBar
        PanelFeatureState st = getPanelState(featureId, true);
        if (st.isOpen) {
            closePanel(st, false);
        }
    }
    return false;
}

From source file:android.support.v7ox.app.AppCompatDelegateImplV7.java

@Override
boolean onMenuOpened(final int featureId, Menu menu) {
    if (featureId == FEATURE_SUPPORT_ACTION_BAR) {
        ActionBar ab = getSupportActionBar();
        if (ab != null) {
            ab.dispatchMenuVisibilityChanged(true);
        }//from   ww  w. j ava 2 s  . c  o m
        return true;
    }
    return false;
}

From source file:android.support.v7ox.app.AppCompatDelegateImplV7.java

@Override
void onPanelClosed(final int featureId, Menu menu) {
    if (featureId == FEATURE_SUPPORT_ACTION_BAR) {
        ActionBar ab = getSupportActionBar();
        if (ab != null) {
            ab.dispatchMenuVisibilityChanged(false);
        }//w  w  w . j  ava2s  .c om
    } else if (featureId == FEATURE_OPTIONS_PANEL) {
        // Make sure that the options panel is closed. This is mainly used when we're using a
        // ToolbarActionBar
        PanelFeatureState st = getPanelState(featureId, true);
        if (st.isOpen) {
            closePanel(st, false);
        }
    }
}