@Override public Object getExtra(Object source, String key) { Bundle extras = ((Fragment) source).getArguments(); return Finder.BUNDLE.getExtra(extras, key); } },
/** * You should call this method after init your argumentsBundle.otherwise the transitionBundle will be not work. */ public void prepare(Fragment toFragment) { final Bundle transitionBundle = TransitionBundleFactory.createTransitionBundle(context, fromView, bitmap); Bundle arguments = toFragment.getArguments(); if (arguments == null) { arguments = new Bundle(); } arguments.putBundle(TRANSITION_BUNDLE, transitionBundle); toFragment.setArguments(arguments); } /**
public ExitFragmentTransition start(Bundle savedInstanceState) { if (interpolator == null) { interpolator = new DecelerateInterpolator(); } final Bundle bundle; if (fragment == null) { if (supportFragment.getArguments() == null) { throw new IllegalStateException("you should call FragmentTransitionLauncher.prepare() at first "); } bundle = supportFragment.getArguments().getBundle(TRANSITION_BUNDLE); } else { if (fragment.getArguments() == null) { throw new IllegalStateException("you should call FragmentTransitionLauncher.prepare() at first "); } bundle = fragment.getArguments().getBundle(TRANSITION_BUNDLE); } final MoveData moveData = TransitionAnimation.startAnimation(toView, bundle, savedInstanceState, duration, interpolator, listener); if (fragment == null) { return new ExitFragmentTransition(supportFragment, moveData); } return new ExitFragmentTransition(fragment, moveData); }
/** * Bind annotated fields in the specified {@link android.app.Fragment} from its arguments. * * @param fragment fragment to bind the arguments; */ public static void bindArguments(android.app.Fragment fragment) { bindArguments(fragment, fragment.getArguments()); }
@Override public Object getExtra(Object source, String key) { Bundle extras = ((Fragment) source).getArguments(); return Finder.BUNDLE.getExtra(extras, key); } },
static void restore(ClassLoader loader, android.app.Fragment fragment, Bundle savedInstanceState) { checkInstance(fragment, "fragment"); restore(loader, fragment, savedInstanceState, fragment.getArguments()); }
data.put("IsResumed", fragment.isResumed()); data.put("IsVisible", fragment.isVisible()); data.put("Arguments", DetailExtractor.getExtractor(Bundle.class).onFillValues(fragment.getArguments(), new HashMap<String, Object>(), data));