Пример #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
    setContentView(R.layout.activity_course);
    init(R.string.course, R.layout.activity_course, R.id.nav_course);

    initGA("Course Screen");
    restoreArgs(savedInstanceState);
    findViews();
    setUpViews();
  }
Пример #2
0
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   super.onActivityResult(requestCode, resultCode, data);
   switch (requestCode) {
     case Constant.REQUEST_PICK_SEMESTER:
       if (resultCode == RESULT_OK && data != null) {
         if (data.hasExtra("mSelectedModel")) {
           mSelectedModel =
               new Gson()
                   .fromJson(
                       data.getStringExtra("mSelectedModel"),
                       new TypeToken<SemesterModel>() {}.getType());
           mYms = mSelectedModel.value;
           mPickYmsTextView.setText(mSelectedModel.text);
           getData(false);
         }
       }
       break;
   }
 }
Пример #3
0
  @Override
  public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);

    outState.putString("mYms", mYms);
    outState.putBoolean("isHoliday", isHoliday);
    outState.putBoolean("isNight", isNight);
    outState.putBoolean("isHolidayNight", isHolidayNight);
    outState.putBoolean("isB", isB);
    outState.putBoolean("isHolidayB", isHolidayB);
    outState.putBoolean("isRetry", isRetry);
    if (mScrollView != null) {
      outState.putInt("mPos", mScrollView.getVerticalScrollbarPosition());
    }
    if (mList != null) {
      outState.putString("mList", new Gson().toJson(mList));
    }
    if (mSelectedModel != null) {
      outState.putString("mSelectedModel", new Gson().toJson(mSelectedModel));
    }
    if (mSemesterList != null) {
      outState.putString("mSemesterList", new Gson().toJson(mSemesterList));
    }
  }
Пример #4
0
  @Override
  public void finish() {
    super.finish();

    overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
  }