List of usage examples for android.app FragmentTransaction setTransition
public abstract FragmentTransaction setTransition(@Transit int transit);
From source file:cn.org.eshow.framwork.util.AbDialogUtil.java
/** * ??./*from ww w . j ava 2 s. c o m*/ * @param context the context * @param indeterminateDrawable * @param message the message * @param style * @param abDialogOnLoadListener */ public static AbLoadDialogFragment showLoadDialog(Context context, int indeterminateDrawable, String message, int style, AbDialogOnLoadListener abDialogOnLoadListener) { FragmentActivity activity = (FragmentActivity) context; AbLoadDialogFragment newFragment = AbLoadDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style); newFragment.setIndeterminateDrawable(indeterminateDrawable); newFragment.setMessage(message); newFragment.setAbDialogOnLoadListener(abDialogOnLoadListener); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.show(ft, dialogTag); return newFragment; }
From source file:com.bangqu.eshow.util.ESDialogUtil.java
/** * //from www .j a va2 s . c o m * ???. * @param view * @param gravity ? * @param style * @param onCancelListener? * @return */ public static ESSampleDialogFragment showDialog(View view, int gravity, int style, DialogInterface.OnCancelListener onCancelListener) { FragmentActivity activity = (FragmentActivity) view.getContext(); // Create and show the dialog. ESSampleDialogFragment newFragment = ESSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style, gravity); newFragment.setContentView(view); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.setOnCancelListener(onCancelListener); newFragment.show(ft, dialogTag); return newFragment; }
From source file:com.bangqu.eshow.util.ESDialogUtil.java
/** * ??.//from w w w . j a va 2s .c o m * @param context the context * @param indeterminateDrawable * @param message the message * @param style * @param abDialogOnRefreshListener */ public static ESLoadDialogFragment showLoadDialog(Context context, int indeterminateDrawable, String message, int style, AbDialogOnLoadListener abDialogOnLoadListener) { FragmentActivity activity = (FragmentActivity) context; ESLoadDialogFragment newFragment = ESLoadDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style); newFragment.setIndeterminateDrawable(indeterminateDrawable); newFragment.setMessage(message); newFragment.setAbDialogOnLoadListener(abDialogOnLoadListener); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.show(ft, dialogTag); return newFragment; }
From source file:cn.org.eshow.framwork.util.AbDialogUtil.java
/** * //from w w w.j av a 2 s . com * ???. * @param view * @param gravity ? * @param style * @return */ public static AbSampleDialogFragment showDialog(View view, int gravity, int style) { FragmentActivity activity = (FragmentActivity) view.getContext(); // Create and show the dialog. AbSampleDialogFragment newFragment = AbSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style, gravity); newFragment.setContentView(view); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.show(ft, dialogTag); return newFragment; }
From source file:cn.org.eshow.framwork.util.AbDialogUtil.java
/** * ??./*from ww w . j a v a 2 s. c o m*/ * @param context the context * @param indeterminateDrawable * @param message the message * @param style */ public static AbRefreshDialogFragment showRefreshDialog(Context context, int indeterminateDrawable, String message, int style) { FragmentActivity activity = (FragmentActivity) context; AbRefreshDialogFragment newFragment = AbRefreshDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style); newFragment.setIndeterminateDrawable(indeterminateDrawable); newFragment.setMessage(message); newFragment.setAbDialogOnLoadListener(null); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.show(ft, dialogTag); return newFragment; }
From source file:cn.org.eshow.framwork.util.AbDialogUtil.java
/** * ??.//from w ww .j a v a 2s . com * @param context * @param indeterminateDrawable * @param message * @param style * @param abDialogOnLoadListener * @return */ public static AbRefreshDialogFragment showRefreshDialog(Context context, int indeterminateDrawable, String message, int style, AbDialogOnLoadListener abDialogOnLoadListener) { FragmentActivity activity = (FragmentActivity) context; AbRefreshDialogFragment newFragment = AbRefreshDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style); newFragment.setIndeterminateDrawable(indeterminateDrawable); newFragment.setMessage(message); newFragment.setAbDialogOnLoadListener(abDialogOnLoadListener); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.show(ft, dialogTag); return newFragment; }
From source file:com.bangqu.eshow.util.ESDialogUtil.java
/** * /* w ww .ja v a2 s .co m*/ * ???. * @param view * @param gravity ? * @param style * @return */ public static ESSampleDialogFragment showDialog(View view, int gravity, int style) { FragmentActivity activity = (FragmentActivity) view.getContext(); // Create and show the dialog. ESSampleDialogFragment newFragment = ESSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style, gravity); newFragment.setContentView(view); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.show(ft, dialogTag); return newFragment; }
From source file:com.bangqu.eshow.util.ESDialogUtil.java
/** * ??./*from w w w .j a va 2s . c o m*/ * @param context the context * @param indeterminateDrawable * @param message the message * @param style */ public static ESRefreshDialogFragment showRefreshDialog(Context context, int indeterminateDrawable, String message, int style) { FragmentActivity activity = (FragmentActivity) context; ESRefreshDialogFragment newFragment = ESRefreshDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style); newFragment.setIndeterminateDrawable(indeterminateDrawable); newFragment.setMessage(message); newFragment.setAbDialogOnLoadListener(null); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.show(ft, dialogTag); return newFragment; }
From source file:com.bangqu.eshow.util.ESDialogUtil.java
/** * ??.//w w w.jav a 2 s .c o m * @param context * @param indeterminateDrawable * @param message * @param style * @param abDialogOnRefreshListener * @return */ public static ESRefreshDialogFragment showRefreshDialog(Context context, int indeterminateDrawable, String message, int style, AbDialogOnLoadListener abDialogOnLoadListener) { FragmentActivity activity = (FragmentActivity) context; ESRefreshDialogFragment newFragment = ESRefreshDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style); newFragment.setIndeterminateDrawable(indeterminateDrawable); newFragment.setMessage(message); newFragment.setAbDialogOnLoadListener(abDialogOnLoadListener); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.show(ft, dialogTag); return newFragment; }
From source file:cn.org.eshow.framwork.util.AbDialogUtil.java
/** * ??Fragment.//from w w w .j a v a2 s . co m * @param context the context */ public static void removeDialog(final Context context) { try { FragmentActivity activity = (FragmentActivity) context; FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE); Fragment prev = activity.getFragmentManager().findFragmentByTag(dialogTag); if (prev != null) { ft.remove(prev); } ft.addToBackStack(null); ft.commit(); } catch (Exception e) { //?Activity?? e.printStackTrace(); } }