Java Code Examples for android.text.format.Time#after()
The following examples show how to use
android.text.format.Time#after() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultAfter.java From opentasks with Apache License 2.0 | 6 votes |
@Override public Time getCustomDefault(ContentSet currentValues, Time genericDefault) { Time reference = mReferenceAdapter != null ? mReferenceAdapter.get(currentValues) : null; boolean useReference = reference != null && !genericDefault.after(reference); Time value = new Time(useReference ? reference : genericDefault); if (value.allDay) { value.monthDay++; } else { value.second = 0; value.minute = 0; value.hour++; } value.normalize(false); return value; }
Example 2
Source File: NotAfter.java From opentasks with Apache License 2.0 | 5 votes |
@Override public Time apply(ContentSet currentValues, Time oldValue, Time newValue) { Time notAfterThisTime = mTimeAdapter.get(currentValues); if (notAfterThisTime != null && newValue != null) { if (newValue.after(notAfterThisTime)) { newValue.set(notAfterThisTime); } } return newValue; }
Example 3
Source File: ShiftIfAfter.java From opentasks with Apache License 2.0 | 5 votes |
@Override public Time apply(ContentSet currentValues, Time oldValue, Time newValue) { Time notAfterThisTime = mTimeAdapter.get(currentValues); if (notAfterThisTime != null && newValue != null) { if (newValue.after(notAfterThisTime)) { mTimeAdapter.set(currentValues, newValue); } } return newValue; }
Example 4
Source File: After.java From opentasks with Apache License 2.0 | 5 votes |
@Override public Time apply(ContentSet currentValues, Time oldValue, Time newValue) { Time reference = mReferenceAdapter.get(currentValues); if (reference != null && newValue != null && !newValue.after(reference)) { newValue.set(mDefault.getCustomDefault(currentValues, reference)); } return newValue; }