I have an activity where I need to accept two dates, a start date and an end date. I have two buttons, which when clicked would display the date pickers. After entering the date, I need to store this date using SharedPreferences. I am using this tutorial:
http://developer.android.com/guide/topics/ui/controls/pickers.html
I have seen questions on two date pickers but none of them are using DialogFragment. They are using deprecated functions, and I don't really want to use those, since I hear it's better to use DialogFragment.
Now how do I go about TWO date pickers? How do I know which button was clicked (startButton or endButton) in the onDateSet function? Is there some way to store the view id in the DialogFragment I create on button click, so that I can access it in onDateSet?
Any help would be great, thanks.