]>
Commit | Line | Data |
---|---|---|
e6ba41a8 PT |
1 | package ro.ieval.unical; |
2 | ||
3dd871ef | 3 | import java.util.Calendar; |
e6ba41a8 | 4 | |
e6ba41a8 PT |
5 | import android.app.DatePickerDialog; |
6 | import android.app.DatePickerDialog.OnDateSetListener; | |
7 | import android.app.Dialog; | |
8 | import android.app.DialogFragment; | |
9 | import android.os.Bundle; | |
e6ba41a8 | 10 | |
3dd871ef | 11 | public class DatePickerFragment extends DialogFragment { |
e4fb15ad MG |
12 | public static final String ARGUMENT_YEAR = "year"; |
13 | public static final String ARGUMENT_MONTH = "month"; | |
14 | public static final String ARGUMENT_DAY = "day"; | |
15 | ||
e6ba41a8 | 16 | @Override |
3dd871ef | 17 | public Dialog onCreateDialog(final Bundle savedInstanceState) { |
e4fb15ad MG |
18 | final Bundle args = getArguments(); |
19 | return new DatePickerDialog(getActivity(), (OnDateSetListener) getActivity(), | |
20 | args.getInt(ARGUMENT_YEAR), | |
21 | args.getInt(ARGUMENT_MONTH), | |
22 | args.getInt(ARGUMENT_DAY)); | |
e6ba41a8 | 23 | } |
e4fb15ad | 24 | } |