Example usage for android.app FragmentTransaction TRANSIT_FRAGMENT_OPEN

List of usage examples for android.app FragmentTransaction TRANSIT_FRAGMENT_OPEN

Introduction

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

Prototype

int TRANSIT_FRAGMENT_OPEN

To view the source code for android.app FragmentTransaction TRANSIT_FRAGMENT_OPEN.

Click Source Link

Document

Fragment is being added onto the stack

Usage

From source file:org.iota.wallet.ui.fragment.NewTransferFragment.java

private void openQRCodeScanner() {
    if (!PermissionRequestHelper.hasCameraPermission(getActivity())) {
        checkPermissionCamera();//from  w  w w  .j  av a2 s  .c  o  m
    } else {
        Fragment fragment = new QRScannerFragment();
        getActivity().getFragmentManager().beginTransaction()
                .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN).add(R.id.container, fragment, null)
                .addToBackStack(null).commit();
    }
}

From source file:com.ab.util.AbDialogUtil.java

/**
 * ???dialog String./*from w  w  w.j  a v  a2  s.  co m*/
 * @param context
 * @param icon
 * @param title ?
 * @param view  ???
 */
public static AbAlertDialogFragment showAlertDialog(Context context, int icon, String title, String message) {
    FragmentActivity activity = (FragmentActivity) context;
    AbAlertDialogFragment newFragment = AbAlertDialogFragment.newInstance(icon, title, message, null, null);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    //    
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, mDialogTag);
    return newFragment;
}

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

/**
 * ?string?./*from w w w  . ja  va 2s  .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);
    FragmentManager fm = activity.getFragmentManager();
    FragmentTransaction ft = fm.beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);
    return newFragment;
}

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

/**
 * ?string?./*  ww w.  j  a va2  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;
}

From source file:com.bangqu.eshow.util.ESDialogUtil.java

/**
 * ?String?./* ww w  .j a  v a 2 s.  com*/
 * @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:cn.org.eshow.framwork.util.AbDialogUtil.java

/**
 * ?String?./*from w w  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:com.ab.util.AbDialogUtil.java

/**
 * ?string?./*from   w ww.ja  v  a 2  s .c  om*/
 * @param context
 * @param icon
 * @param title ?
 * @param message ???
 * @param onClickListener ?
 */
public static AbAlertDialogFragment showAlertDialog(Context context, int icon, String title, String message,
        AbDialogOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) context;
    AbAlertDialogFragment newFragment = AbAlertDialogFragment.newInstance(icon, title, message, null,
            onClickListener);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    //    
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, mDialogTag);
    return newFragment;
}

From source file:com.pszh.ablibrary.util.AbDialogUtil.java

/**
 * ?string?./*from   w  ww  .j a  v  a2  s  . c o m*/
 * @param context
 * @param icon
 * @param title ?
 * @param message ???
 * @param onClickListener ?
 */
public static AbAlertDialogFragment showAlertDialog(Context context, int icon, String title, String message,
        AbAlertDialogFragment.AbDialogOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) context;
    AbAlertDialogFragment newFragment = AbAlertDialogFragment.newInstance(icon, title, message, null,
            onClickListener);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    //    
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, mDialogTag);
    return newFragment;
}

From source file:ab.util.AbDialogUtil.java

/**
 * ?()//w  w  w . j a v  a  2 s  .  co  m
 * 
 * @param view
 * @param onCancelListener
 * @return
 */
public static AbSampleDialogFragment showPanel(View view, int gravity,
        DialogInterface.OnCancelListener onCancelListener) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    // Create and show the dialog.
    AbSampleDialogFragment newFragment = AbSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE,
            android.R.style.Theme_Light_Panel, gravity);
    newFragment.setContentView(view);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.setOnCancelListener(onCancelListener);
    newFragment.show(ft, mDialogTag);
    return newFragment;
}

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

/**
 * ?String?.//from   w  ww .  ja  v a  2  s. c  o  m
 * 
 * @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;
}