Example usage for android.app FragmentTransaction setTransition

List of usage examples for android.app FragmentTransaction setTransition

Introduction

In this page you can find the example usage for android.app FragmentTransaction setTransition.

Prototype

public abstract FragmentTransaction setTransition(@Transit int transit);

Source Link

Document

Select a standard transition animation for this transaction.

Usage

From source file:cn.org.eshow.framwork.util.AbDialogUtil.java

/**
 * ?String?./* ww  w . j  a  v a 2s . c  o  m*/
 * @param context
 * @param title ?
 * @param message ???
 * @param onClickListener ?
 */
public static AbAlertDialogFragment showAlertDialog(Context context, String title, String message,
        AbDialogOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) context;
    AbAlertDialogFragment newFragment = AbAlertDialogFragment.newInstance(0, title, message, null,
            onClickListener);
    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

/**
 * ?View?./*from www . j av a2  s .  c  o m*/
 * @param icon
 * @param title ?
 * @param view ???
 * @param onClickListener ?
 */
public static AbAlertDialogFragment showAlertDialog(int icon, String title, View view,
        AbDialogOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    AbAlertDialogFragment newFragment = AbAlertDialogFragment.newInstance(icon, title, null, view,
            onClickListener);
    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

/**
 * ?View?./*from  w w w .  ja  va2 s .  c  o m*/
 * @param title ?
 * @param view ???
 * @param onClickListener ?
 */
public static AbAlertDialogFragment showAlertDialog(String title, View view,
        AbDialogOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    AbAlertDialogFragment newFragment = AbAlertDialogFragment.newInstance(0, title, null, view,
            onClickListener);
    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

/**
 * ?string?./* w w  w  .j a v a 2s  .co  m*/
 * @param context
 * @param icon
 * @param title ?
 * @param message ???
 * @param onClickListener ?
 */
public static ESAlertDialogFragment showAlertDialog(Context context, int icon, String title, String message,
        AbDialogOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) context;
    ESAlertDialogFragment newFragment = ESAlertDialogFragment.newInstance(icon, title, message, null,
            onClickListener);
    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

/**
 * ?String?.//from   ww w .  j  a va  2s  .  co m
 * @param context
 * @param title ?
 * @param message ???
 * @param onClickListener ?
 */
public static ESAlertDialogFragment showAlertDialog(Context context, String title, String message,
        AbDialogOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) context;
    ESAlertDialogFragment newFragment = ESAlertDialogFragment.newInstance(0, title, message, null,
            onClickListener);
    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

/**
 * ?View?.//w  ww . j  a v a  2 s  .c om
 * @param icon
 * @param title ?
 * @param view ???
 * @param onClickListener ?
 */
public static ESAlertDialogFragment showAlertDialog(int icon, String title, View view,
        AbDialogOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    ESAlertDialogFragment newFragment = ESAlertDialogFragment.newInstance(icon, title, null, view,
            onClickListener);
    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

/**
 * ?View?.//from w w  w. ja  v a 2 s .co m
 * @param title ?
 * @param view ???
 * @param onClickListener ?
 */
public static ESAlertDialogFragment showAlertDialog(String title, View view,
        AbDialogOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    ESAlertDialogFragment newFragment = ESAlertDialogFragment.newInstance(0, title, null, view,
            onClickListener);
    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 .ja  v a  2s .c  om
 * @param context the context
 * @param indeterminateDrawable
 * @param message the message
 * @param style
 */
public static AbLoadDialogFragment showLoadDialog(Context context, int indeterminateDrawable, String message,
        int style) {
    FragmentActivity activity = (FragmentActivity) context;
    AbLoadDialogFragment newFragment = AbLoadDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style);
    newFragment.setIndeterminateDrawable(indeterminateDrawable);
    newFragment.setMessage(message);
    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 the context
 * @param indeterminateDrawable
 * @param message the message
 * @param style
 */
public static ESLoadDialogFragment showLoadDialog(Context context, int indeterminateDrawable, String message,
        int style) {
    FragmentActivity activity = (FragmentActivity) context;
    ESLoadDialogFragment newFragment = ESLoadDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style);
    newFragment.setIndeterminateDrawable(indeterminateDrawable);
    newFragment.setMessage(message);
    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

/**
 * /*ww  w. j  a va  2 s . c  o  m*/
 * ???.
 * @param view
 * @param gravity ?
 * @param style
 * @param onCancelListener?
 * @return
 */
public static AbSampleDialogFragment showDialog(View view, int gravity, int style,
        DialogInterface.OnCancelListener onCancelListener) {
    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.setOnCancelListener(onCancelListener);
    newFragment.show(ft, dialogTag);
    return newFragment;
}