Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- datebutton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- showDialog(DATE_DIALOG_ID);
- }
- });
- timebutton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- showDialog(TIME_DIALOG_ID);
- }
- });
- @Override
- protected Dialog onCreateDialog(int id) {
- switch (id) {
- case DATE_DIALOG_ID:
- return new DatePickerDialog(getDialogContext(),
- mDateSetListener,
- mYear, mMonth, mDay);
- case TIME_DIALOG_ID:
- return new TimePickerDialog(getDialogContext(),
- mTimeSetListener, mHour, mMinute, false);
- }
- return null;
- }
Add Comment
Please, Sign In to add comment