Example usage for android.support.v4.app FragmentManagerTrojan dispatchOptionsItemSelected

List of usage examples for android.support.v4.app FragmentManagerTrojan dispatchOptionsItemSelected

Introduction

In this page you can find the example usage for android.support.v4.app FragmentManagerTrojan dispatchOptionsItemSelected.

Prototype

public static boolean dispatchOptionsItemSelected(final FragmentManager fm, final MenuItem item) 

Source Link

Usage

From source file:org.mariotaku.twidere.fragment.ActivityHostFragment.java

@Override
public boolean onOptionsItemSelected(final MenuItem item) {
    if (mAttachedActivity == null || !isVisible() || !isAdded())
        return false;
    if (!mAttachedActivity.onOptionsItemSelected(item) && mAttachedActivity instanceof FragmentActivity) {
        final FragmentManager fm = ((FragmentActivity) mAttachedActivity).getSupportFragmentManager();
        return FragmentManagerTrojan.dispatchOptionsItemSelected(fm, item);
    }//from  w  w w. j ava  2 s.  c  o  m
    return true;
}