Android使用非格里历的日历 [英] Android Use Non-Gregorian Calendars

查看:152
本文介绍了Android使用非格里历的日历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个 DatePickerDialogFragment ,用户将选择出生日期。我想确保我可以处理非gregorian日期。我无法更改要在我的设备上使用的日历类型。 Android是否给予用户切换日历类型的能力?如果有什么步骤?我目前在设置上没有成功。

I'm creating a DatePickerDialogFragment where the user will select date of birth. I am wanting to make sure I can handle dates which are non-gregorian. I have not been able to change which type of calendar to use on my device. Does Android give the user the capability to switch the calendar type? If so what are the steps? I have had no success in the settings so far.

推荐答案

Android似乎不支持任何其他日历。事实上, Calendar 类只有一个直接子类: GregorianCalendar

Android does not seem to support any other calendars. In fact, the Calendar class only has one direct subclass: GregorianCalendar.

请参阅日历类的Android API参考。

See the Android API reference for the Calendar class.

要支持 DatePickerDialogFragment 中的另一个日历,您必须自己实现。

For supporting another calendar in the DatePickerDialogFragment you will have to implement it yourself.

这篇关于Android使用非格里历的日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆