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:com.bangqu.eshow.util.ESDialogUtil.java

/**
 * ??./*from   www . j  av  a2  s. 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 a  va2s  . co  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.ab.util.AbDialogUtil.java

/**
 * ??./*from   w w  w. j  a  va2s.  c om*/
 * @param context the context
 * @param indeterminateDrawable
 * @param message the message
 */
public static AbLoadDialogFragment showLoadDialog(Context context, int indeterminateDrawable, String message,
        AbDialogOnLoadListener abDialogOnLoadListener) {
    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);
    newFragment.setAbDialogOnLoadListener(abDialogOnLoadListener);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    //    
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, mDialogTag);
    return newFragment;
}

From source file:com.android.tv.settings.accessories.AddAccessoryActivity.java

protected void switchToMultipleDevicesFragment() {
    FragmentTransaction ft = mFragmentManager.beginTransaction();
    mContentFragment = AddAccessoryContentFragment.newInstance(true);
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    ft.replace(R.id.content_fragment, mContentFragment);
    ft.disallowAddToBackStack();/*from www  .ja v a  2 s.co m*/

    ft.commit();
    mMsgHandler.sendEmptyMessageDelayed(MSG_MULTIPAIR_BLINK, BLINK_START);
    mShowingMultiFragment = true;
}

From source file:ab.util.AbDialogUtil.java

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

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

/**
 * ??.//from   w  ww  .  j a  v  a2  s  .com
 * 
 * @param context
 *            the context
 * @param indeterminateDrawable
 * @param message
 *            the message
 * @param style
 * @param abDialogOnRefreshListener
 */
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.ab.util.AbDialogUtil.java

/**
 * ??.//from   w w  w. j  a v  a  2 s .  co  m
 * @param context the context
 * @param indeterminateDrawable
 * @param message the message
 */
public static AbLoadDialogFragment showLoadPanel(Context context, int indeterminateDrawable, String message) {
    FragmentActivity activity = (FragmentActivity) context;
    AbLoadDialogFragment newFragment = AbLoadDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE,
            android.R.style.Theme_Light_Panel);
    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

/**
 * ??.// ww  w  . ja v  a 2  s  .  com
 * @param context the context
 * @param indeterminateDrawable
 * @param message the message
 */
public static AbLoadDialogFragment showLoadDialog(Context context, int indeterminateDrawable, String message,
        AbDialogFragment.AbDialogOnLoadListener abDialogOnLoadListener) {
    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);
    newFragment.setAbDialogOnLoadListener(abDialogOnLoadListener);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    //    
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, mDialogTag);
    return newFragment;
}

From source file:com.android.mail.ui.OnePaneController.java

@Override
public void launchFragment(final Fragment fragment, final int selectPosition) {
    replaceFragment(fragment, FragmentTransaction.TRANSIT_FRAGMENT_OPEN, TAG_CUSTOM_FRAGMENT,
            R.id.content_pane);// ww w .ja  v a 2 s . c  om
}

From source file:com.prasanna.android.stacknetwork.QuestionActivity.java

private void showCommentFragment(long postId, ArrayList<Comment> comments) {
    String fragmentTag = postId + "-" + StringConstants.COMMENTS;
    commentFragment = findFragmentByTag(fragmentTag, CommentFragment.class);

    if (commentFragment == null) {
        commentFragment = new CommentFragment();
        commentFragment.setComments(comments);
        commentFragment.setResultReceiver(resultReceiver);

        String currentViewPagerFragmentTag = "android:switcher:" + R.id.viewPager + ":"
                + viewPager.getCurrentItem();

        OnCommentChangeListener onCommentChangeListener = (OnCommentChangeListener) getFragmentManager()
                .findFragmentByTag(currentViewPagerFragmentTag);

        if (onCommentChangeListener != null)
            commentFragment.setOnCommentChangeListener(onCommentChangeListener);
    }//  w ww.j  av  a2  s.  c  o  m

    FragmentTransaction transaction = getFragmentManager().beginTransaction();
    transaction.replace(R.id.fragmentContainer, commentFragment, fragmentTag);
    transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    transaction.addToBackStack(fragmentTag);
    transaction.commit();
}