use of com.tevinjeffrey.rutgersct.ui.courseinfo.CourseInfoFragment in project Rutgers-Course-Tracker by tevjef.
the class CourseFragment method startCourseInfoFragment.
private void startCourseInfoFragment(Bundle b) {
CourseInfoFragment courseInfoFragment = new CourseInfoFragment();
FragmentTransaction ft = getFragmentManager().beginTransaction();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ChangeBounds changeBoundsTransition = new ChangeBounds();
changeBoundsTransition.setInterpolator(new DecelerateInterpolator());
courseInfoFragment.setEnterTransition(new Fade(Fade.IN).setStartDelay(250));
courseInfoFragment.setReturnTransition(new Fade(Fade.OUT).setDuration(50));
courseInfoFragment.setAllowReturnTransitionOverlap(false);
courseInfoFragment.setAllowEnterTransitionOverlap(false);
courseInfoFragment.setSharedElementEnterTransition(changeBoundsTransition);
courseInfoFragment.setSharedElementReturnTransition(changeBoundsTransition);
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);
}
courseInfoFragment.setArguments(b);
startFragment(this, courseInfoFragment, ft);
}
Aggregations