avast / android-styled-dialogs

Backport of Material dialogs with easy-to-use API based on DialogFragment
Apache License 2.0
2.15k stars 450 forks source link

Adding in a DatePicker #37

Closed kd7uiy closed 10 years ago

kd7uiy commented 10 years ago

Added a DatePicker dialog, with hooks to get the Date either in UTC or a specified TimeZone.

AX-NICOLAS commented 10 years ago

Good job !

tomas-vondracek commented 10 years ago

@kd7uiy thanks for your pull request! I believe this will be nice addition to the library, there are two things to correct though: 1) SimpleTimePickerDialogFragment & SimpleDatePickerDialogFragment should extend BaseDialogFragment (or maybe base class for picker fragments?). I know it might be little bit more code, but with current solution clients will have available builder method setMessage() that have no sense in case of date/time picker. You can follow the ProgressDialogFragment example. While doing that, you can also add your own equivalent of ISimpleDialogListener where you can send the selected date/time.

2) Please, add an example of use to the demo project.

Thanks again and I'm looking forward for your changes!

kd7uiy commented 10 years ago

I've made the changes you requested, except for putting a demo in to the project. I'll work on that soon, but I thought I'd give you another look.

tomas-vondracek commented 10 years ago

Looks good, can't wait to try it in demo project :)

kd7uiy commented 10 years ago

Added to the demo project. I'm already using a form of this in an app, BTW, called Ham Finder. It's used to pick my time/date for edits to the log. Thanks for making this possible, and let me know if there's anything else I need to do!

kd7uiy commented 10 years ago

How's the latest version? I think I accidentally did a format of the entire file, which ensures consistent spaces, etc, but it can be a bit overbearing sometimes...

kd7uiy commented 10 years ago

Added a new dialog, UsernamePassword. Also added a new Listener, TwoStrings, which works for anything that the output is two strings.

davidvavra commented 10 years ago

@tomas-vondracek: What do you think about recent changes in this pull request? Can we merge?

davidvavra commented 10 years ago

Hi, I have merged your changes in commit ec3b933fcb40cc01affc8266c8cfe20b635571ad

We chose to separate your pull request in two - we included the date and time picker, but didn't include the login dialog. We think that login dialog is not common, it's specific for your app, therefore it shouldn't be in the library.