|
|
@ -14,7 +14,7 @@
|
|
|
|
* limitations under the License.
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
package net.micode.notes.ui;
|
|
|
|
// package net.micode.notes.ui;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Calendar;
|
|
|
|
import java.util.Calendar;
|
|
|
|
|
|
|
|
|
|
|
@ -29,6 +29,7 @@ import android.content.DialogInterface.OnClickListener;
|
|
|
|
import android.text.format.DateFormat;
|
|
|
|
import android.text.format.DateFormat;
|
|
|
|
import android.text.format.DateUtils;
|
|
|
|
import android.text.format.DateUtils;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*去持续集成检查 */
|
|
|
|
public class DateTimePickerDialog extends AlertDialog implements OnClickListener {
|
|
|
|
public class DateTimePickerDialog extends AlertDialog implements OnClickListener {
|
|
|
|
|
|
|
|
|
|
|
|
private Calendar mDate = Calendar.getInstance();
|
|
|
|
private Calendar mDate = Calendar.getInstance();
|
|
|
@ -45,7 +46,7 @@ public class DateTimePickerDialog extends AlertDialog implements OnClickListener
|
|
|
|
mDateTimePicker = new DateTimePicker(context);
|
|
|
|
mDateTimePicker = new DateTimePicker(context);
|
|
|
|
setView(mDateTimePicker);
|
|
|
|
setView(mDateTimePicker);
|
|
|
|
mDateTimePicker.setOnDateTimeChangedListener(new OnDateTimeChangedListener() {
|
|
|
|
mDateTimePicker.setOnDateTimeChangedListener(new OnDateTimeChangedListener() {
|
|
|
|
public void onDateTimeChanged(DateTimePicker view, int year, int month,
|
|
|
|
public void onDateTimeChanged(int year, int month,
|
|
|
|
int dayOfMonth, int hourOfDay, int minute) {
|
|
|
|
int dayOfMonth, int hourOfDay, int minute) {
|
|
|
|
mDate.set(Calendar.YEAR, year);
|
|
|
|
mDate.set(Calendar.YEAR, year);
|
|
|
|
mDate.set(Calendar.MONTH, month);
|
|
|
|
mDate.set(Calendar.MONTH, month);
|
|
|
@ -81,7 +82,7 @@ public class DateTimePickerDialog extends AlertDialog implements OnClickListener
|
|
|
|
setTitle(DateUtils.formatDateTime(this.getContext(), date, flag));
|
|
|
|
setTitle(DateUtils.formatDateTime(this.getContext(), date, flag));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void onClick(DialogInterface arg0, int arg1) {
|
|
|
|
public void onClick(int arg1) {
|
|
|
|
if (mOnDateTimeSetListener != null) {
|
|
|
|
if (mOnDateTimeSetListener != null) {
|
|
|
|
mOnDateTimeSetListener.OnDateTimeSet(this, mDate.getTimeInMillis());
|
|
|
|
mOnDateTimeSetListener.OnDateTimeSet(this, mDate.getTimeInMillis());
|
|
|
|
}
|
|
|
|
}
|
|
|
|