private boolean updateSemiMonthly(View v, Recur r) { SemiMonthly sm = (SemiMonthly) r; EditText t1 = (EditText) v.findViewById(R.id.edFirstDay); if (Utils.isEmpty(t1)) { showError(t1, R.string.recur_error_specify_first_day); return false; } sm.firstDay = Integer.parseInt(Utils.text(t1)); EditText t2 = (EditText) v.findViewById(R.id.edSecondDay); if (Utils.isEmpty(t2)) { showError(t2, R.string.recur_error_specify_second_day); return false; } sm.secondDay = Integer.parseInt(Utils.text(t2)); return true; }
private boolean updateExactlyTimes(View v, Recur r) { EditText e = (EditText) v.findViewById(R.id.edTimes); if (Utils.isEmpty(e)) { showError(e, R.string.recur_error_specify_times); return false; } r.periodParam = Long.parseLong(Utils.text(e)); return true; }
private boolean updateEveryXDay(View v, Recur r) { EveryXDay x = (EveryXDay) r; EditText t = (EditText) v.findViewById(R.id.edEveryXDays); if (Utils.isEmpty(t)) { showError(t, R.string.recur_error_specify_days); return false; } x.days = Integer.parseInt(Utils.text(t)); return true; }