Back to project page whohasmystuff.
The source code is released under:
GNU General Public License
If you think the Android project whohasmystuff listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.freewarepoint.whohasmystuff; //from w w w. j a v a 2 s. c o m import android.app.DatePickerDialog; import android.app.Dialog; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.widget.DatePicker; public class DatePickerFragment extends DialogFragment implements DatePickerDialog.OnDateSetListener { private int year; private int month; private int day; @Override public void setArguments(Bundle args) { super.setArguments(args); year = args.getInt("year"); month = args.getInt("month"); day = args.getInt("day"); } @Override public Dialog onCreateDialog(Bundle savedInstanceState) { return new DatePickerDialog(getActivity(), this, year, month, day); } public void onDateSet(DatePicker view, int year, int month, int day) { if (getTag().equals("fragment_pick_date")) { ((AddObject)getActivity()).updateDate(year, month, day); } else if (getTag().equals("fragment_pick_return_date")) { ((AddObject)getActivity()).updateReturnDate(year, month, day); } } }