如何创建自定义日期选择器? [英] How to create custom datepicker?

查看:86
本文介绍了如何创建自定义日期选择器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建仅显示月份和年份的自定义日期选择器对话框。任何人都可以请指导我如何做到这一点?

I want create custom datepicker dialog which displays only month and year. Can anyone pls guide me how to do this?

问候
Monali

Regards Monali

推荐答案

如果您不希望创建/使用自定义视图,我最好的猜测是尝试和使用反射,如<一个href=\"http://stackoverflow.com/questions/4122929/how-to-display-date-picker-for-android-with-only-month-and-year-fields\">suggested低于这个类似的问题。除非你想改变这个例子应用到一年领域代替。

If you don't want to create/use a custom view, my best guess would be to try and use reflection, as suggested below this similar question. Except you will want to change that example to apply to the year field in stead.

这篇关于如何创建自定义日期选择器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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