use of com.tevinjeffrey.rutgersct.ui.subject.SubjectFragment in project Rutgers-Course-Tracker by tevjef.
the class ChooserFragment method startSubjectFragment.
private void startSubjectFragment(Bundle b) {
SubjectFragment sf = new SubjectFragment();
sf.setArguments(b);
FragmentTransaction ft = getFragmentManager().beginTransaction();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
sf.setExitTransition(new Fade(Fade.OUT).excludeTarget(ImageView.class, true).setDuration(100));
sf.setReturnTransition(new Fade(Fade.OUT).excludeTarget(ImageView.class, true).setDuration(100));
sf.setAllowReturnTransitionOverlap(false);
sf.setAllowEnterTransitionOverlap(false);
sf.setSharedElementEnterTransition(new ChangeBounds().setInterpolator(new DecelerateInterpolator()));
sf.setSharedElementReturnTransition(new ChangeBounds().setInterpolator(new DecelerateInterpolator()));
ft.addSharedElement(mToolbar, getString(R.string.transition_name_tool_background));
} else {
ft.setCustomAnimations(R.anim.enter, R.anim.exit, R.anim.pop_enter, R.anim.pop_exit);
}
startFragment(this, sf, ft);
}
Aggregations