Example usage for android.app Fragment isRemoving

List of usage examples for android.app Fragment isRemoving

Introduction

In this page you can find the example usage for android.app Fragment isRemoving.

Prototype

final public boolean isRemoving() 

Source Link

Document

Return true if this fragment is currently being removed from its activity.

Usage

From source file:org.cirrus.mobi.pegel.PegelFragmentsActivity.java

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.detailmenu, menu);
    Fragment f = getFragmentManager().findFragmentById(R.id.details);
    //check if the pegel-details are shown, only then show the refresh action
    if ((!(f instanceof DetailDataFragment)) || f.isRemoving())
        menu.removeItem(R.id.m_refresh);
    return true;/*from  w w w.j a  v a  2 s . co m*/
}