自定义DatePicker [英] Custom DatePicker

查看:78
本文介绍了自定义DatePicker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经停止了几个DatePicker的问题,我似乎找不到任何解决方案。

I ve been stuck on a DatePicker problem for several and i can't seem to find any solution.

我目前有一个适合我需求的DatePickerDialog YET我还需要能够隐藏/禁用日和月字段(为了选择一个月或一年),除了实现我自己的MonthPicker / yearPicker之外,我找不到任何解决方案。事实上,我真的不知道从哪里开始写一个与默认样式相同的选择器。

I currently have a DatePickerDialog which fits quite well to my needs YET I also need to be able to hide / disable Both Day and Month field (in order to select a Month or a Year), I can't find any solution except implementing my own MonthPicker/yearPicker . the fact is I don't really know where to begin with to write a picker which has the same style as the default one.

如果有任何人,我会很高兴有自定义日期picjer的示例代码或任何更简单的想法来应对我的问题。

I would be glad if any of you have sample code of custom date picjer or any simpler Idea to get to cope with my problem.

非常感谢

hush

推荐答案

我的想法是使用Android的自定义日期选择器。在Google代码中,我发现一个名为 Android Wheel 的开源项目

My idea is using a custom Date Picker for android. In Google Code, I found an open source project called Android Wheel

从Google代码结算源代码后,您会发现几个示例,以便您可以根据需要轻松自定义年鉴选择器。

After checkout source code from Google Code, you'll find several example so that you can easily customize a year-picker as you want.

这篇关于自定义DatePicker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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