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

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

Introduction

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

Prototype

public int show(FragmentTransaction transaction, String tag) 

Source Link

Document

Display the dialog, adding the fragment using an existing transaction and then committing the transaction.

Usage

From source file:de.schildbach.litecoinwallet.ui.HelpDialogFragment.java

public static void page(final FragmentManager fm, @Nonnull final String page) {
    final DialogFragment newFragment = HelpDialogFragment.instance(page);
    newFragment.show(fm, FRAGMENT_TAG);
}

From source file:com.example.nitish.welcomapp.activitypt.AboutFragment.java

/**
 * Show the Dialog.//from  ww  w .j  a  v a 2 s  .com
 *
 * @param fm The FragmentManager
 */
public static void showDialog(@NonNull FragmentManager fm) {
    final DialogFragment fragment = new AboutFragment();
    fragment.show(fm, TAG);
}

From source file:com.dm.material.dashboard.candybar.fragments.dialog.WallpaperSettingsFragment.java

public static void showWallpaperSettings(FragmentManager fm) {
    FragmentTransaction ft = fm.beginTransaction();
    Fragment prev = fm.findFragmentByTag(TAG);
    if (prev != null) {
        ft.remove(prev);/* ww  w  .  j av  a 2  s .  c  o  m*/
    }

    try {
        DialogFragment dialog = WallpaperSettingsFragment.newInstance();
        dialog.show(ft, TAG);
    } catch (IllegalArgumentException | IllegalStateException ignored) {
    }
}

From source file:com.hivewallet.androidclient.wallet.ui.WalletAddressDialogFragment.java

public static void show(final FragmentManager fm, @Nonnull final String address, @Nonnull final Bitmap qrCode) {
    final DialogFragment newFragment = instance(address, qrCode);
    newFragment.show(fm, FRAGMENT_TAG);
}

From source file:com.dm.material.dashboard.candybar.fragments.dialog.IconPreviewFragment.java

public static void showIconPreview(@NonNull FragmentManager fm, @NonNull String name, int id) {
    FragmentTransaction ft = fm.beginTransaction();
    Fragment prev = fm.findFragmentByTag(TAG);
    if (prev != null) {
        ft.remove(prev);//  w ww.j  a  v a2  s .  co m
    }

    try {
        DialogFragment dialog = IconPreviewFragment.newInstance(name, id);
        dialog.show(ft, TAG);
    } catch (IllegalArgumentException | IllegalStateException ignored) {
    }
}

From source file:com.dm.material.dashboard.candybar.fragments.dialog.LicensesFragment.java

public static void showLicensesDialog(FragmentManager fm) {
    FragmentTransaction ft = fm.beginTransaction();
    Fragment prev = fm.findFragmentByTag(TAG);
    if (prev != null) {
        ft.remove(prev);//  w w  w. j a va 2s .  co m
    }

    try {
        DialogFragment dialog = LicensesFragment.newInstance();
        dialog.show(ft, TAG);
    } catch (IllegalArgumentException | IllegalStateException ignored) {
    }
}

From source file:com.dm.material.dashboard.candybar.fragments.dialog.CreditsFragment.java

public static void showCreditsDialog(FragmentManager fm) {
    FragmentTransaction ft = fm.beginTransaction();
    Fragment prev = fm.findFragmentByTag(TAG);
    if (prev != null) {
        ft.remove(prev);//from   www  .  j  ava 2s .  c o  m
    }

    try {
        DialogFragment dialog = CreditsFragment.newInstance();
        dialog.show(ft, TAG);
    } catch (IllegalStateException | IllegalArgumentException ignored) {
    }
}

From source file:com.dm.wallpaper.board.fragments.dialogs.WallpaperSettingsFragment.java

public static void showWallpaperSettings(FragmentManager fm) {
    FragmentTransaction ft = fm.beginTransaction();
    Fragment prev = fm.findFragmentByTag(TAG);
    if (prev != null) {
        ft.remove(prev);//from  w  ww  .  j  av a 2s  . c o m
    }

    try {
        DialogFragment dialog = WallpaperSettingsFragment.newInstance();
        dialog.show(ft, TAG);
    } catch (IllegalStateException | IllegalArgumentException ignored) {
    }
}

From source file:com.amalgam.app.DialogFragmentUtils.java

public static final void showOnLoaderCallback(Handler handler, final FragmentManager manager,
        final DialogFragment fragment, final String tag) {
    handler.post(new Runnable() {
        @Override/* w w  w . j ava  2  s. c o m*/
        public void run() {
            fragment.show(manager, tag);
        }
    });
}

From source file:com.dm.wallpaper.board.fragments.dialogs.LicensesFragment.java

public static void showLicensesDialog(FragmentManager fm) {
    FragmentTransaction ft = fm.beginTransaction();
    Fragment prev = fm.findFragmentByTag(TAG);
    if (prev != null) {
        ft.remove(prev);//from   w w  w. j  av  a 2 s .  c  o  m
    }

    try {
        DialogFragment dialog = LicensesFragment.newInstance();
        dialog.show(ft, TAG);
    } catch (IllegalStateException | IllegalArgumentException ignored) {
    }
}