自定义的DatePicker [英] Custom DatePicker
问题描述
我已经被贴在一个datepicker问题有很多,我似乎无法找到任何解决方案。
I ve been stuck on a DatePicker problem for several and i can't seem to find any solution.
我现在有一个DatePickerDialog这符合得很好,以我的需求,但我还需要能够隐藏/禁用天和月字段(以选择一个月或一年),我找不到任何解决方案除了实现自己的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.
如果你们有样本$ C $的自定义日期picjer或任何简单的理念C到去应付我的问题,我会很高兴。
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.
多谢
嘘
推荐答案
。在谷歌code,我发现了一个名为的Android轮的开源项目
My idea is using a custom Date Picker for android. In Google Code, I found an open source project called Android Wheel
在从谷歌code结帐源$ C $ C,你会发现几个例子,这样只要你想,你可以轻松地定制为期一年的选择器。
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屋!