如何创建这样的日期选择器?

时间:2012-05-05 09:29:18

标签: java android mono

enter image description here

Android 2.2如何创建这样的日期选择器?

3 个答案:

答案 0 :(得分:2)

您可以尝试此链接日历选择器,如您的需求screenshot and documentation和项目的代码here,您也可以下载此项目apk文件here ....!

您下载此项目的完整源代码链接here

...谢谢!

答案 1 :(得分:1)

为此,您必须通过在对话框上绘制CalendarView并在该网格上呈现所有日期来创建自己的GridView。您需要手动处理开始日期逻辑。即从哪个网格项开始向您显示date.an在该网格上,您可以轻松地绘制标记。

here is是开始

的好例子

答案 2 :(得分:1)

创建一个这样的布局....比如 calender.xml

然后在对话框中膨胀

Dialog dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
RelativeLayout featureLayout = (RelativeLayout) View.inflate(ClassName.this, R.layout.popoverview, null);
dialog.setContentView(featureLayout);

dialog.show();