Android - 新的日历样式 DatePicker 和 TimePicker [英] Android - New calendar style DatePicker and TimePicker

查看:17
本文介绍了Android - 新的日历样式 DatePicker 和 TimePicker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用最新版android中使用的新DatePickerDialogTimePickerDialog样式?它们可以在这里看到:新样式日期和时间选择器

Is it possible to use the new DatePickerDialog and TimePickerDialog style used in the latest version of android? They can be seen here : New style Date and time pickers

我尝试寻找 AOSP 项目的最新来源,但是使用该代码时,我仍然得到旧的(带有微调器)-它们使用相同的 DatePickerDialogTimePickerDialog 类,所以我没有期待其他任何东西.

I tried looking for the latest sources of the AOSP Project, but event with that code, I still get the old one (With spinners) - They use the same DatePickerDialog and TimePickerDialog classes, so I was not expecting anything else.

感谢您的帮助.

推荐答案

为了将来参考,BetterPickers 库添加了对来自 AOSP 的 Google Now 和 Google Calendar 日期和时间选择器的支持.

For future reference, the BetterPickers library has added support for the Google Now and Google Calendar date and time pickers from AOSP.

https://github.com/derekbrameyer/android-betterpickers/

我无法正确实现 tyczj 建议的库,而且它的测试 APK 甚至会导致 ANR.Better Pickers 似乎更稳定.

I have not been able to properly implement the library tyczj suggested, and the test APK for it even causes an ANR. Better Pickers seems more stable.

如果其他人想要实现这一点,可能值得一试.

Might be worth checking out both if anyone else wants to implement this.

这篇关于Android - 新的日历样式 DatePicker 和 TimePicker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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