简体   繁体   English

像Android Calendar app这样的Android DatePicker

[英]Android DatePicker like Android Calendar app

I am trying to implement an activity where I want the user to put a date information. 我正在尝试实施一项活动,我希望用户输入日期信息。

I would like it to look like the Android Calendar App. 我希望它看起来像Android日历应用程序。 Their button looks like a spinner, but with the selected date (picture 1). 他们的按钮看起来像个微调框,但带有选定的日期(图1)。 When the button is clicked, it opens the Date Picker dialog (picture 2). 单击该按钮后,将打开“日期选择器”对话框(图2)。

http://pineapple.cc/datepicker1.png http://pineapple.cc/datepicker1.png

http://pineapple.cc/datepicker2.png http://pineapple.cc/datepicker2.png

Should I use a redesigned button, spinner, textview ? 我应该使用重新设计的按钮,微调器,textview吗?

Thank you a lot for you help 非常感谢您的帮助

Does the supplied widget not do it for you? 提供的小部件不适合您吗? Ooops misunderstood question. 糟糕的问题。 Disregard. 漠视。

Edit: 编辑:

I'm looking at the EditEventView activity in the Calendar app, and they're using a button that launches the DatePicker widget. 我正在查看“日历”应用程序中的EditEventView活动,他们使用的是一个启动DatePicker小部件的按钮。 The setDate() method there does the formatting. setDate()方法在那里进行格式化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM