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:ab.util.AbDialogUtil.java

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

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

/**
 * ??./*  ww  w . j av a2  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, mDialogTag);
    return newFragment;
}

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

/**
 * ??.//w w  w  . j  a v  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

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

/**
 * ?View?./* w w  w . j  a 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, mDialogTag);
    return newFragment;
}

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

/**
 * ??./* ww w  .  j av a  2  s . c  o  m*/
 * @param context the context
 * @param indeterminateDrawable
 * @param message the message
 */
public static AbLoadDialogFragment showLoadDialog(Context context, int indeterminateDrawable, String message) {
    FragmentActivity activity = (FragmentActivity) context;
    AbLoadDialogFragment newFragment = AbLoadDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE,
            android.R.style.Theme_Holo_Light_Dialog);
    newFragment.setIndeterminateDrawable(indeterminateDrawable);
    newFragment.setMessage(message);
    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

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

From source file:at.alladin.rmbt.android.map.RMBTMapFragment.java

@Override
public void onClick(View v) {
    final FragmentManager fm = getActivity().getFragmentManager();
    final FragmentTransaction ft;

    final GoogleMap map = getMap();

    switch (v.getId()) {

    case R.id.mapChooseButton:

        ft = fm.beginTransaction();// w ww.j ava 2  s  .c  om
        ft.replace(R.id.fragment_content, new RMBTMapChooseFragment(), "map_choose");
        ft.addToBackStack("map_choose");
        ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
        ft.commit();

        break;

    case R.id.mapFilterButton:

        ft = fm.beginTransaction();
        ft.replace(R.id.fragment_content, new RMBTMapFilterFragment(), "map_filter");
        ft.addToBackStack("map_filter");
        ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
        ft.commit();

        break;

    case R.id.mapLocateButton:

        if (map != null) {
            final Location location = geoLocation.getLastKnownLocation();
            if (location != null) {
                final LatLng latlng = new LatLng(location.getLatitude(), location.getLongitude());
                gMap.animateCamera(CameraUpdateFactory.newLatLng(latlng));
            }
        }
        break;

    case R.id.mapHelpButton:
        ((RMBTMainActivity) getActivity()).showHelp("", false, AppConstants.PAGE_TITLE_HELP); // TODO: put correct
        // help url
        break;

    case R.id.mapInfoButton:
        showInfoToast();
        break;

    case R.id.mapZoomInButton:

        if (map != null)
            map.animateCamera(CameraUpdateFactory.zoomIn());

        break;

    case R.id.mapZoomOutButton:

        if (map != null)
            map.animateCamera(CameraUpdateFactory.zoomOut());

        break;

    default:
        break;
    }

}

From source file:ab.util.AbDialogUtil.java

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

/**
 * ??./* www . j  a v  a  2s.  com*/
 * 
 * @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;
}