Example usage for android.app Fragment isResumed

List of usage examples for android.app Fragment isResumed

Introduction

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

Prototype

final public boolean isResumed() 

Source Link

Document

Return true if the fragment is in the resumed state.

Usage

From source file:com.tananaev.fmelib.FragmentUtil.java

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public static void runWhenResumed(android.app.Fragment fragment, Task task) {
    if (fragment.isResumed()) {
        task.run(false);/*from w w w. j a v  a  2s.c  o  m*/
    } else {
        fragmentPendingTasks(fragment).add(task);
    }
}