12/24 timesetting is no based on the android system settings
This commit is contained in:
Bernhard Redl 2011-04-20 10:01:23 +08:00 committed by cketti
parent 6f4bef3530
commit 120a39d5d6

View file

@ -6,6 +6,7 @@ package com.fsck.k9.preferences;
import android.content.Context;
import android.preference.DialogPreference;
import android.text.format.DateFormat;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TimePicker;
@ -73,8 +74,8 @@ public class TimePickerPreference extends DialogPreference implements
protected View onCreateDialogView() {
TimePicker tp = new TimePicker(getContext());
tp.setIs24HourView(DateFormat.is24HourFormat(getContext()));
tp.setOnTimeChangedListener(this);
originalHour = getHour();
originalMinute = getMinute();
if (originalHour >= 0 && originalMinute >= 0)