Configuration userConfig = new Configuration();
Settings.System.getConfiguration( getContentResolver(), userConfig );
Calendar cal = Calendar.getInstance( userConfig.locale);
TimeZone tz = cal.getTimeZone();
when the user changes the time zone in the Settings app then the above will get the
newly updated value.
that wasn't obvious, wasn't it?
/**
* Calcuate if it's currently "daytime" by our internal definition. Used to
* decide which icons to show when updating widgets.
*/
public static boolean isDaytime() {
Time time = new Time();
time.setToNow();
return (time.hour >= DAYTIME_BEGIN_HOUR && time.hour <= DAYTIME_END_HOUR);
}
分享到:
相关推荐
NULL 博文链接:https://ollevere.iteye.com/blog/1320854
VB中的日历控件,microsoft calendar control 11.0.8161.0,请注意版本对应!
Microsoft Calendar Control 9.0.0.2607, VB中的日历控件!请注意版本对应!
轻量级的原生js日历插件calendar.js使用指南.docx
microsoft calendar control 12.0.6413.1000;microsoft 日历控件
SimpleCalendar.js日历插件是一款带农历节日的日历表插件代码。
microsoft 日历控件;microsoft calendar control 11.0.8161.0
jira-calendar-plugin-1.19.jar
资源来自pypi官网。 资源全名:LunarCalendar-0.0.9.tar.gz
python库。 资源全名:trytond_calendar-3.0.5.tar.gz
资源来自pypi官网。 资源全名:kotti_calendar-0.2.tar.gz
资源来自pypi官网。 资源全名:trytond_calendar-2.8.5.tar.gz
calendar-backend-源码.rar
资源来自pypi官网。 资源全名:telebot-calendar-1.2.tar.gz
System.out.print(mycalendar1.get(Calendar.YEAR) + "年"); System.out.print(mycalendar1.get(Calendar.MONTH) + "月"); System.out.println(mycalendar1.get(Calendar.DATE) + "日"); System.out....
资源来自pypi官网。 资源全名:monet.calendar.event-0.3.2.tar.gz
python库。 资源全名:mds_pim_calendar-4.6.0.tar.gz
System.out.print(mycalendar1.get(Calendar.YEAR) + "年"); System.out.print(mycalendar1.get(Calendar.MONTH) + "月"); System.out.println(mycalendar1.get(Calendar.DATE) + "日"); System.out....
JsCalendar javascript 日历插件 1.0.zip