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:com.tony.selene.dialog.AbDialogUtil.java

/**
 * ?String./*from www  .j a  va 2 s.c o m*/
 * 
 * @param context
 * @param title
 *            ?
 */
public static TCAlertDialogFragment showAlertDialog(Context context, String message) {
    FragmentActivity activity = (FragmentActivity) context;
    TCAlertDialogFragment newFragment = TCAlertDialogFragment.newInstance(0, null, message, null, null);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);
    return newFragment;
}

From source file:com.tony.selene.dialog.AbDialogUtil.java

/**
 * ???dialog View.//from  w  w w .ja v a  2s  .  c om
 * 
 * @param icon
 * @param title
 *            ?
 * @param view
 *            ???
 */
public static TCAlertDialogFragment showAlertDialog(int icon, String title, View view) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    TCAlertDialogFragment newFragment = TCAlertDialogFragment.newInstance(icon, title, null, view, null);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);
    return newFragment;
}

From source file:com.tony.selene.dialog.AbDialogUtil.java

/**
 * ???dialog View./*  w w  w  . j  a va  2 s  .  c om*/
 * 
 * @param title
 *            ?
 * @param view
 *            ???
 */
public static TCAlertDialogFragment showAlertDialog(String title, View view) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    TCAlertDialogFragment newFragment = TCAlertDialogFragment.newInstance(0, title, null, view, null);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);
    return newFragment;
}

From source file:com.tony.selene.dialog.AbDialogUtil.java

/**
 * ???dialog String./* w  w w . j av a  2  s. c  o  m*/
 * 
 * @param context
 * @param title
 *            ?
 * @param view
 *            ???
 */
public static TCAlertDialogFragment showAlertDialog(Context context, String title, String message) {
    FragmentActivity activity = (FragmentActivity) context;
    TCAlertDialogFragment newFragment = TCAlertDialogFragment.newInstance(0, title, message, null, null);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);
    return newFragment;
}

From source file:com.tony.selene.dialog.AbDialogUtil.java

/**
 * ?String?.//  w w  w  .  j a v  a2  s.c om
 * 
 * @param context
 * @param title
 *            ?
 * @param message
 *            ???
 * @param onClickListener
 *            ?
 */
public static TCAlertDialogFragment showAlertDialog(Context context, String title, String message,
        TCAlertDialogFragmentOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) context;
    TCAlertDialogFragment newFragment = TCAlertDialogFragment.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.tony.selene.dialog.AbDialogUtil.java

/**
 * ?View?./*  w  ww.  ja  v a  2  s.  c om*/
 * 
 * @param icon
 * @param title
 *            ?
 * @param view
 *            ???
 * @param onClickListener
 *            ?
 */
public static TCAlertDialogFragment showAlertDialog(int icon, String title, View view,
        TCAlertDialogFragmentOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    TCAlertDialogFragment newFragment = TCAlertDialogFragment.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.tony.selene.dialog.AbDialogUtil.java

/**
 * ?View?./*from ww  w .  j  ava  2  s.co m*/
 * 
 * @param title
 *            ?
 * @param view
 *            ???
 * @param onClickListener
 *            ?
 */
public static TCAlertDialogFragment showAlertDialog(String title, View view,
        TCAlertDialogFragmentOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    TCAlertDialogFragment newFragment = TCAlertDialogFragment.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.tony.selene.util.AbDialogUtil.java

/**
 * ??.//from w  w  w  .  j  a  v  a 2 s. c  o m
 * 
 * @param context
 *            the context
 * @param indeterminateDrawable
 *            0
 * @param message
 *            the message
 */
public static AbProgressDialogFragment showProgressDialog(Context context, int indeterminateDrawable,
        String message) {
    FragmentActivity activity = (FragmentActivity) context;
    AbProgressDialogFragment newFragment = AbProgressDialogFragment.newInstance(indeterminateDrawable, message);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);
    return newFragment;
}

From source file:com.tony.selene.dialog.AbDialogUtil.java

/**
 * ??./*from   w w  w.  jav  a  2  s  . c o m*/
 * 
 * @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.tony.selene.util.AbDialogUtil.java

/**
 * ?string?./*  w ww . jav  a  2 s.c  o m*/
 * 
 * @param context
 * @param icon
 * @param title
 *            ?
 * @param message
 *            ???
 * @param onClickListener
 *            ?
 */
public static TCAlertDialogFragment showAlertDialog(Context context, int icon, String title, String message,
        TCAlertDialogFragmentOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) context;
    TCAlertDialogFragment newFragment = TCAlertDialogFragment.newInstance(icon, title, message, null,
            onClickListener);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);
    return newFragment;
}