Example usage for android.app ActionBar collapseActionView

List of usage examples for android.app ActionBar collapseActionView

Introduction

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

Prototype

@UnsupportedAppUsage
public boolean collapseActionView() 

Source Link

Usage

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

boolean onBackPressed() {
    // Back cancels action modes first.
    if (mActionMode != null) {
        mActionMode.finish();/*from  w w  w. j av a2 s  .c o  m*/
        return true;
    }

    // Next collapse any expanded action views.
    ActionBar ab = getSupportActionBar();
    if (ab != null && ab.collapseActionView()) {
        return true;
    }

    // Let the call through...
    return false;
}