use of com.tevinjeffrey.rutgersct.ui.trackedsections.TrackedSectionsFragment in project Rutgers-Course-Tracker by tevjef.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (!Once.beenDone(Once.THIS_APP_INSTALL, SHOW_TOUR)) {
Intent intent = new Intent(this, IntroActivity.class);
startActivity(intent);
finish();
}
RutgersCTApp.getObjectGraph(this).inject(this);
setContentView(R.layout.activity_main);
Icepick.restoreInstanceState(this, savedInstanceState);
if (savedInstanceState == null) {
TrackedSectionsFragment tsf = new TrackedSectionsFragment();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
tsf.setEnterTransition(new AutoTransition().excludeTarget(ImageView.class, true));
tsf.setExitTransition(new Fade(Fade.OUT).excludeTarget(ImageView.class, true));
tsf.setReenterTransition(new AutoTransition().excludeTarget(ImageView.class, true));
tsf.setReturnTransition(new Fade(Fade.IN).excludeTarget(ImageView.class, true));
tsf.setAllowReturnTransitionOverlap(false);
tsf.setAllowEnterTransitionOverlap(false);
tsf.setSharedElementEnterTransition(new ChangeBounds().setInterpolator(new DecelerateInterpolator()));
tsf.setSharedElementReturnTransition(new ChangeBounds().setInterpolator(new DecelerateInterpolator()));
}
getFragmentManager().beginTransaction().replace(R.id.container, tsf).commit();
}
RutgersCTApp.getObjectGraph(this).get(Alarm.class).setAlarm();
}
Aggregations