Example usage for android.support.v4.app DialogFragment getClass

List of usage examples for android.support.v4.app DialogFragment getClass

Introduction

In this page you can find the example usage for android.support.v4.app DialogFragment getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.droidparts.inner.delegate.SupportDelegate.java

public static void showDialogFragment(FragmentActivity activity, DialogFragment df) {
    FragmentManager fm = activity.getSupportFragmentManager();
    String tag = df.getClass().getName();
    FragmentTransaction ft = fm.beginTransaction();
    Fragment f = fm.findFragmentByTag(tag);
    if (f != null) {
        ft.remove(f);/*  www.ja v  a2s . c  o  m*/
    }
    df.show(ft, tag);
}

From source file:org.droidparts.inner.fragments.SecretFragmentsSupportUtil.java

public static void dialogFragmentShowDialogFragment(FragmentActivity fragmentActivity,
        DialogFragment dialogFragment) {
    FragmentManager fm = fragmentActivity.getSupportFragmentManager();
    String tag = dialogFragment.getClass().getName();
    FragmentTransaction ft = fm.beginTransaction();
    Fragment f = fm.findFragmentByTag(tag);
    if (f != null) {
        ft.remove(f);//from  ww  w .  ja va  2s  .  co m
    }
    dialogFragment.show(ft, tag);
}

From source file:com.king.base.BaseActivity.java

public void showDialogFragment(DialogFragment dialogFragment) {
    String tag = dialogFragment.getTag() != null ? dialogFragment.getTag()
            : dialogFragment.getClass().getSimpleName();
    showDialogFragment(dialogFragment, tag);
}