List of usage examples for android.support.v4.app FragmentActivity getSupportFragmentManager
public FragmentManager getSupportFragmentManager()
From source file:com.google.android.apps.iosched.util.WiFiUtils.java
public static void showWiFiDialog(FragmentActivity activity) { FragmentManager fm = activity.getSupportFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); Fragment prev = fm.findFragmentByTag("dialog_wifi"); if (prev != null) { ft.remove(prev);//from w w w. j a v a2 s .c om } ft.addToBackStack(null); new WiFiDialog(isWiFiEnabled(activity)).show(ft, "dialog_wifi"); }
From source file:cn.jarlen.richcommon.ui.FragmentStack.java
public static void removeFragment(FragmentActivity context, Fragment fragment) { FragmentManager fragmentManager = context.getSupportFragmentManager(); fragmentManager.beginTransaction().remove(fragment).commit(); }
From source file:cn.jarlen.richcommon.ui.FragmentStack.java
public static Fragment findFragment(FragmentActivity context, Class<?> fragment) { FragmentManager fragmentManager = context.getSupportFragmentManager(); return fragmentManager.findFragmentByTag(fragment.getSimpleName()); }
From source file:cn.jarlen.richcommon.ui.FragmentStack.java
public static void hideFragment(FragmentActivity context, Fragment fragment) { FragmentManager fragmentManager = context.getSupportFragmentManager(); FragmentTransaction ft = fragmentManager.beginTransaction(); ft.hide(fragment).commit();/* w w w . ja va 2 s . c o m*/ }
From source file:org.tigase.mobile.WarningDialog.java
public static void showWarning(FragmentActivity activity, String message) { try {/*from w w w. j ava 2 s .co m*/ DialogFragment newFragment = WarningDialog.newInstance(message); newFragment.show(activity.getSupportFragmentManager(), "dialog"); } catch (IllegalStateException e) { showNotification(activity, message, null); } }
From source file:cn.jarlen.richcommon.ui.FragmentStack.java
public static void showFragment(FragmentActivity context, Fragment fragment) { FragmentManager fragmentManager = context.getSupportFragmentManager(); FragmentTransaction ft = fragmentManager.beginTransaction(); ft.setCustomAnimations(anim_In, anim_out); ft.show(fragment).commit();/*from w w w .jav a 2 s .c o m*/ }
From source file:android.arch.lifecycle.LifecycleDispatcher.java
private static void markState(FragmentActivity activity, State state) { markStateIn(activity, state);//from www .jav a 2 s . c o m markState(activity.getSupportFragmentManager(), state); }
From source file:com.tomeokin.lspush.ui.navigator.Navigator.java
public static void moveTo(FragmentActivity base, Class<? extends Fragment> fragment, Bundle args, boolean addToBackStack) { moveTo(base, base.getSupportFragmentManager(), fragment, args, DEFAULT_LAYOUT_ID, addToBackStack); }
From source file:com.ada.utils.Ui.java
public static <T extends Fragment> T findFragment(FragmentActivity activity, int resId) { return (T) activity.getSupportFragmentManager().findFragmentById(resId); }
From source file:com.ada.utils.Ui.java
public static <T extends Fragment> T findFragment(FragmentActivity activity, String tag) { return (T) activity.getSupportFragmentManager().findFragmentByTag(tag); }