Example usage for android.app FragmentTransaction TRANSIT_FRAGMENT_CLOSE

List of usage examples for android.app FragmentTransaction TRANSIT_FRAGMENT_CLOSE

Introduction

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

Prototype

int TRANSIT_FRAGMENT_CLOSE

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

Click Source Link

Document

Fragment is being removed from the stack

Usage

From source file:de.mrapp.android.preference.activity.PreferenceActivity.java

/**
 * Shows the fragment, which provides the navigation to each preference header's fragment.
 *//*from w  w w.j  a  va 2s. c om*/
private void showPreferenceHeaders() {
    notifyOnPreferenceFragmentHidden();
    int transition = 0;

    if (isPreferenceHeaderSelected()) {
        transition = FragmentTransaction.TRANSIT_FRAGMENT_CLOSE;
        currentHeader = null;
        preferenceScreenFragment = null;
    }

    adaptBreadCrumbVisibility(breadCrumbVisibility);
    replaceFragment(preferenceHeaderFragment, R.id.preference_header_parent, transition);
}

From source file:android.app.FragmentManager.java

public static int reverseTransit(int transit) {
    int rev = 0;//from w  w  w  .j  a v a  2s.  c  o m
    switch (transit) {
    case FragmentTransaction.TRANSIT_FRAGMENT_OPEN:
        rev = FragmentTransaction.TRANSIT_FRAGMENT_CLOSE;
        break;
    case FragmentTransaction.TRANSIT_FRAGMENT_CLOSE:
        rev = FragmentTransaction.TRANSIT_FRAGMENT_OPEN;
        break;
    case FragmentTransaction.TRANSIT_FRAGMENT_FADE:
        rev = FragmentTransaction.TRANSIT_FRAGMENT_FADE;
        break;
    }
    return rev;

}

From source file:android.app.FragmentManager.java

public static int transitToStyleIndex(int transit, boolean enter) {
    int animAttr = -1;
    switch (transit) {
    case FragmentTransaction.TRANSIT_FRAGMENT_OPEN:
        animAttr = enter ? com.android.internal.R.styleable.FragmentAnimation_fragmentOpenEnterAnimation
                : com.android.internal.R.styleable.FragmentAnimation_fragmentOpenExitAnimation;
        break;//from www.ja  v  a 2  s. co  m
    case FragmentTransaction.TRANSIT_FRAGMENT_CLOSE:
        animAttr = enter ? com.android.internal.R.styleable.FragmentAnimation_fragmentCloseEnterAnimation
                : com.android.internal.R.styleable.FragmentAnimation_fragmentCloseExitAnimation;
        break;
    case FragmentTransaction.TRANSIT_FRAGMENT_FADE:
        animAttr = enter ? com.android.internal.R.styleable.FragmentAnimation_fragmentFadeEnterAnimation
                : com.android.internal.R.styleable.FragmentAnimation_fragmentFadeExitAnimation;
        break;
    }
    return animAttr;
}