Ejemplo n.º 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;
 }
Ejemplo n.º 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());
   }
 }
Ejemplo n.º 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());
 }
Ejemplo n.º 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;
      }
    }
  }
Ejemplo n.º 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();
  }
Ejemplo n.º 6
0
 @Override
 public void onPause() {
   super.onPause();
 }
Ejemplo n.º 7
0
 @Override
 public void onResume() {
   super.onResume();
 }
Ejemplo n.º 8
0
 @Override
 public void onStart() {
   super.onStart();
 }