Esempio n. 1
0
  @Override
  public void onAttach(Context context) {
    super.onAttach(context);

    try {
      timeTableDataContext = (IGetTimeTableData) context;
    } catch (ClassCastException e) {
      throw new ClassCastException(context.toString() + " must implement IGetCourseData");
    }

    mSectionsPagerAdapter = new SectionsPagerAdapter();
  }
Esempio n. 2
0
  @Override
  public void onDestroyView() {
    super.onDestroyView();
    Activity context = getActivity();
    if (context != null) {
      subscriber.unsubscribe();

      if (!context.isFinishing())
        ((GetStorage) context)
            .storage()
            .put(TimetableDataFragment.LAST_PAGE, mViewPager.getCurrentItem());
    }
  }