List of usage examples for android.support.v4.app FragmentActivity getSupportFragmentManager
public FragmentManager getSupportFragmentManager()
From source file:sysnetlab.android.sdc.ui.fragments.FragmentUtils.java
public static void switchFragment(FragmentActivity activity, Fragment fragment, String name, int backStackOption) { FragmentTransaction transaction = activity.getSupportFragmentManager().beginTransaction(); transaction.setCustomAnimations(R.anim.fadein, R.anim.fadeout); transaction.replace(R.id.fragment_container, fragment); if (backStackOption == FragmentUtils.FRAGMENT_SWITCH_ADD_TO_BACKSTACK) transaction.addToBackStack(name); transaction.commit();/*from w ww . j a v a2 s. c o m*/ }
From source file:org.droidparts.inner.fragments.SecretFragmentsSupportUtil.java
public static void fragmentActivitySetFragmentVisible(FragmentActivity fragmentActivity, boolean visible, Fragment... fragments) {/* w w w . ja va 2 s . co m*/ FragmentManager fm = fragmentActivity.getSupportFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); for (Fragment fragment : fragments) { if (visible) { ft.show(fragment); } else { ft.hide(fragment); } } ft.commit(); }
From source file:org.devcon.android.util.MenuUtil.java
public static void showOpenSourceLicenses(FragmentActivity activity) { FragmentManager fm = activity.getSupportFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); Fragment prev = fm.findFragmentByTag("dialog_licenses"); if (prev != null) { ft.remove(prev);/*www . j a v a2s .c om*/ } ft.addToBackStack(null); new showLicenses().show(ft, "dialog_licenses"); }
From source file:com.whp.android.fragment.FragmentUtils.java
/** * showFragment//from ww w .j av a2s. c o m * * @param fragment * @param tag * @param addToBackStack */ public static void showFragment(FragmentActivity fragmentActivity, Fragment fragment, String tag, boolean addToBackStack) { FragmentTransaction ft = fragmentActivity.getSupportFragmentManager().beginTransaction(); ft.setCustomAnimations(R.anim.enter, R.anim.exit, R.anim.pop_enter, R.anim.pop_exit); ft.replace(R.id.fragment_container, fragment, tag); if (addToBackStack) { ft.addToBackStack(tag); } ft.commit(); }
From source file:com.github.yuukis.businessmap.app.ContactsItemsDialogFragment.java
public static void showDialog(FragmentActivity activity, List<ContactsItem> contactsList) { FragmentManager manager = activity.getSupportFragmentManager(); newInstance(contactsList).show(manager, TAG); }
From source file:com.andrada.sitracker.ui.fragment.AboutDialog.java
public static void showWhatsNew(FragmentActivity activity) { FragmentManager fm = activity.getSupportFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); Fragment prev = fm.findFragmentByTag(WhatsNewDialog.FRAGMENT_TAG); if (prev != null) { ft.remove(prev);// w w w . j av a2s .co m } ft.addToBackStack(null); new WhatsNewDialog().show(ft, WhatsNewDialog.FRAGMENT_TAG); }
From source file:com.andrada.sitracker.ui.fragment.AboutDialog.java
public static void showOpenSourceLicenses(FragmentActivity activity) { FragmentManager fm = activity.getSupportFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); Fragment prev = fm.findFragmentByTag(OpenSourceLicensesDialog.FRAGMENT_TAG); if (prev != null) { ft.remove(prev);/* www . j ava 2 s. co m*/ } ft.addToBackStack(null); new OpenSourceLicensesDialog().show(ft, OpenSourceLicensesDialog.FRAGMENT_TAG); }
From source file:jahirfiquitiva.iconshowcase.dialogs.IconDialog.java
public static void show(final FragmentActivity context, String name, int resId) { Fragment frag = context.getSupportFragmentManager().findFragmentByTag(TAG); if (frag != null) ((IconDialog) frag).dismiss();/*from ww w. ja v a 2 s. c o m*/ IconDialog.newInstance(name, resId).show(context.getSupportFragmentManager(), TAG); }
From source file:com.sshine.huochexing.model.FavoriteCharacterDialogFragment.java
@Deprecated public static void show(FragmentActivity activity, String title, String[] items) { show(activity.getSupportFragmentManager(), -1, title, items); }
From source file:com.github.michalbednarski.intentslab.sandbox.SandboxManager.java
public static void requestSandboxInstall(FragmentActivity activity) { (new SandboxInstallRequestDialog()).show(activity.getSupportFragmentManager(), "sandboxInstallRequest"); }