Java Code Examples for android.support.v4.app.FragmentTransaction#TRANSIT_NONE

The following examples show how to use android.support.v4.app.FragmentTransaction#TRANSIT_NONE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ReactNativeFragment.java    From native-navigation with MIT License 6 votes vote down vote up
@Override
public Animation onCreateAnimation(int transit, boolean enter, int nextAnim) {
  if (!enter) {
    // React Native will flush the UI cache as soon as we unmount it. This will cause the view to
    // disappear unless we delay it until after the fragment animation.
    if (transit == FragmentTransaction.TRANSIT_NONE && nextAnim == 0) {
      reactRootView.unmountReactApplication();
    } else {
      contentContainer.unmountReactApplicationAfterAnimation(reactRootView);

    }
    reactRootView = null;
  }
  if (getActivity() instanceof ScreenCoordinatorComponent) {
    ScreenCoordinator screenCoordinator =
            ((ScreenCoordinatorComponent) getActivity()).getScreenCoordinator();
    if (screenCoordinator != null) {
      // In some cases such as TabConfig, the screen may be loaded before there is a screen
      // coordinator but it doesn't live inside of any back stack and isn't visible.
      return screenCoordinator.onCreateAnimation(transit, enter, nextAnim);
    }
  }
  return null;
}
 
Example 2
Source File: TransactionData.java    From flowr with Apache License 2.0 4 votes vote down vote up
public TransactionData(Class<? extends T> fragmentClass) {
    this(fragmentClass, FragmentTransaction.TRANSIT_NONE, FragmentTransaction.TRANSIT_NONE);
}
 
Example 3
Source File: TransactionData.java    From flowr with Apache License 2.0 4 votes vote down vote up
public TransactionData(Class<? extends T> fragmentClass, int enterAnim, int exitAnim) {
    this(fragmentClass, enterAnim, exitAnim, FragmentTransaction.TRANSIT_NONE,
            FragmentTransaction.TRANSIT_NONE);
}
 
Example 4
Source File: Flowr.java    From flowr with Apache License 2.0 2 votes vote down vote up
/**
 * The default enter animation to be used for fragment transactions
 *
 * @return the default fragment enter animation
 */
protected int getDefaultEnterAnimation() {
    return FragmentTransaction.TRANSIT_NONE;
}
 
Example 5
Source File: Flowr.java    From flowr with Apache License 2.0 2 votes vote down vote up
/**
 * The default exit animation to be used for fragment transactions
 *
 * @return the default fragment exit animation
 */
protected int getDefaultExitAnimation() {
    return FragmentTransaction.TRANSIT_NONE;
}
 
Example 6
Source File: Flowr.java    From flowr with Apache License 2.0 2 votes vote down vote up
/**
 * The default pop enter animation to be used for fragment transactions
 *
 * @return the default fragment pop enter animation
 */
protected int getDefaultPopEnterAnimation() {
    return FragmentTransaction.TRANSIT_NONE;
}
 
Example 7
Source File: Flowr.java    From flowr with Apache License 2.0 2 votes vote down vote up
/**
 * The default pop exit animation to be used for fragment transactions
 *
 * @return the default fragment pop exit animation
 */
protected int getDefaultPopExitAnimation() {
    return FragmentTransaction.TRANSIT_NONE;
}