mEventLoader.startBackgroundThread();
eventsChanged();
CalendarView view = (CalendarView) mViewSwitcher.getCurrentView();
+ view.updateIs24HourFormat();
view.restartCurrentTimeUpdates();
+ view = (CalendarView) mViewSwitcher.getNextView();
+ view.updateIs24HourFormat();
+
// Register for Intent broadcasts
IntentFilter filter = new IntentFilter();
p.setTextSize(HOURS_FONT_SIZE);
p.setTypeface(null);
- mIs24HourFormat = DateFormat.is24HourFormat(context);
- mHourStrs = mIs24HourFormat ? CalendarData.s24Hours : CalendarData.s12HoursNoAmPm;
- mHoursWidth = computeMaxStringWidth(0, mHourStrs, p);
+ updateIs24HourFormat();
mAmString = DateUtils.getAMPMString(Calendar.AM);
mPmString = DateUtils.getAMPMString(Calendar.PM);
}
}
+ public void updateIs24HourFormat() {
+ mIs24HourFormat = DateFormat.is24HourFormat(mParentActivity);
+ mHourStrs = mIs24HourFormat ? CalendarData.s24Hours : CalendarData.s12HoursNoAmPm;
+ }
+
/**
* Returns the start of the selected time in milliseconds since the epoch.
*