简体   繁体   中英

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. Their button looks like a spinner, but with the selected date (picture 1). When the button is clicked, it opens the Date Picker dialog (picture 2).

http://pineapple.cc/datepicker1.png

http://pineapple.cc/datepicker2.png

Should I use a redesigned button, spinner, 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. The setDate() method there does the formatting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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