Example usage for android.app DialogFragment isVisible

List of usage examples for android.app DialogFragment isVisible

Introduction

In this page you can find the example usage for android.app DialogFragment isVisible.

Prototype

final public boolean isVisible() 

Source Link

Document

Return true if the fragment is currently visible to the user.

Usage

From source file:org.mariotaku.twidere.util.SaveFileTask.java

@Override
protected void onCancelled() {
    final FragmentManager fm = activity.getFragmentManager();
    final DialogFragment fragment = (DialogFragment) fm.findFragmentByTag(PROGRESS_FRAGMENT_TAG);
    if (fragment != null && fragment.isVisible()) {
        fragment.dismiss();/*  ww w  .  ja va2  s .  c o  m*/
    }
    super.onCancelled();
}