예제 #1
0
 @Override
 public boolean DateValuesChanged(Bundle data) {
   super.DateValuesChanged(data);
   if (GetStartMode() == StartMode.EDIT) {
     if (dateStart.getTimeInMillis() != data.getLong("dateStart")) return true;
   }
   return false;
 }
예제 #2
0
 @Override
 public void SaveDateValuesBeforeChange(Bundle data) {
   super.SaveDateValuesBeforeChange(data);
   if (GetStartMode() == StartMode.EDIT) {
     data.putLong("dateStart", dataRow.GetStartDate().getTimeInMillis());
     data.putLong("dateEndOn", dataRow.GetRepeat().GetEndOnDate().getTimeInMillis());
   }
 }
예제 #3
0
 @Override
 protected void onSaveInstanceState(Bundle outState) {
   super.onSaveInstanceState(outState);
   // save controls state
   outState.putString("subject", edSubject.getText().toString());
   outState.putBoolean("alarm", false);
   outState.putLong("dateStart", dateStart.getTimeInMillis());
   outState.putBoolean("allday", chkAllDay.isChecked());
   outState.putInt("repeatType", iRepeatType);
   outState.putInt("repeatEvery", iRepeatEvery);
   outState.putLong("dateEndOn", dateEndOn.getTimeInMillis());
 }
예제 #4
0
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    Bundle extras = CommonActivity.getIntentExtras(data);
    if (extras != null) {
      // check for date widget edit request code
      if (requestCode == DateWidget.SELECT_DATE_REQUEST) {
        final long lDate =
            DateWidget.GetSelectedDateOnActivityResult(requestCode, resultCode, extras, dateStart);
        if (lDate != -1) {
          UpdateStartDateTimeView();
          return;
        }
      }

      // check for time widget edit request code
      if ((requestCode == TimeWidget.SELECT_TIME_REQUEST) && (resultCode == RESULT_OK)) {
        final int iHour =
            TimeWidget.GetSelectedTimeHourOnActivityResult(requestCode, resultCode, extras);
        final int iMinute =
            TimeWidget.GetSelectedTimeMinuteOnActivityResult(requestCode, resultCode, extras);
        dateStart.set(Calendar.HOUR_OF_DAY, iHour);
        dateStart.set(Calendar.MINUTE, iMinute);
        chkAllDay.setChecked(false);
        UpdateStartDateTimeView();
        return;
      }

      // get KeyboardWidget result
      if ((requestCode == KeyboardWidget.EDIT_TEXT_REQUEST) && (resultCode == RESULT_OK)) {
        String sText = KeyboardWidget.GetTextOnActivityResult(requestCode, resultCode, extras);
        edSubject.setText(sText);
        return;
      }
    }
  }
예제 #5
0
  // methods
  @Override
  public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setContentView(R.layout.course);

    // initialize objects
    dataRow = new DataRowCourse(userdb);
    dataTable = new DataTable(dataRow);

    // check startup mode and open data
    if (GetStartMode() == StartMode.EDIT) if (!OpenDataForEdit(dataTable)) finish();

    // initialize views
    InitViews();
    InitState();
  }
예제 #6
0
 @Override
 public void onPause() {
   super.onPause();
 }
예제 #7
0
 @Override
 public void onResume() {
   super.onResume();
 }
예제 #8
0
 @Override
 public void onStart() {
   super.onStart();
 }