How to Create Datepicker and Timepicker Dialogs in Fragment Class

How to create datePicker and timePicker dialogs in fragment class?

You will most likely need to use a DialogFragment. I found some information here:

Show dialog from fragment?

and also a big help here:

https://github.com/commonsguy/cw-advandroid/blob/master/Honeycomb/FeedFragments/src/com/commonsware/android/feedfrags/AddFeedDialogFragment.java

This should help you get on your way, I am doing this very thing now. Though inside the example code I don't use a builder and instead just return:

return new DatePickerDialog(getActivity(), mDateSetListener, mYear, mMonth, mDay);

This seems to work... though I cannot figure out yet how to update the text on the fragment that calls this DialogFragment. I thought this would work and it doesn't:

 public void updateDisplay()
{
//update our button text from the calling fragment, this isn't quite working
//doesn't crash just doesn't update...must be missing something.
View v=getActivity()
.getLayoutInflater()
.inflate(R.layout.session_edits, null);
Button sessionDate = (Button)v.findViewById(R.id.sessionPickDate);
sessionDate.setText(new StringBuilder()
.append(mMonth+1).append("-").append(mDay).append("-").append(mYear).append(" "));

}

Create a DatePicker and TimePicker in the Tab Fragment error

At first rectify your onCreateView method .

        @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
contentView=inflater.inflate(R.layout.daily_weight_fragement, container, false);
btnTime = (EditText) contentView.findViewById(R.id.time_field);
btnTime.setOnClickListener(this);
btnDate = (EditText) contentView.findViewById(R.id.date_field);
btnDate.setOnClickListener(this);
return contentView;
}

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

}

Logcat Returns

Error:(79, 35) error: no suitable constructor found for
DatePickerDialog(KeyInWeightF,,int,int,int) constructor
DatePickerDialog.DatePickerDialog(Context,int,OnDateSetListener,int,int,int)
is not applicable (actual and formal argument lists differ in length)
constructor
DatePickerDialog.DatePickerDialog(Context,OnDateSetListener,int,int,int)
is not applicable (actual argument KeyInWeightF cannot be converted to
Context by method invocation conversion)

Solutions

You should use getActivity() instead of KeyInWeightF.this

getActivity() in a Fragment returns the Activity the Fragment is currently associated with.

timePickerDialog = new TimePickerDialog(getActivity(), new TimePickerDialog.OnTimeSetListener() {

As same as

  String timestring = DateUtils.formatDateTime(getActivity(),timeCalendar.getTimeInMillis(),DateUtils.FORMAT_SHOW_TIME);

Get date and time picker value from a single dialog fragment and set it in EditText

Date Picker and Time Picker both in single dialog. check this code.

main_Activity.java

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
custom = new CustomDateTimePicker(this,
new CustomDateTimePicker.ICustomDateTimeListener() {

@Override
public void onSet(Dialog dialog, Calendar calendarSelected,
Date dateSelected, int year, String monthFullName,
String monthShortName, int monthNumber, int date,
String weekDayFullName, String weekDayShortName,
int hour24, int hour12, int min, int sec,
String AM_PM) {
((TextView) findViewById(R.id.lablel))
.setText(calendarSelected
.get(Calendar.DAY_OF_MONTH)
+ "/" + (monthNumber+1) + "/" + year
+ ", " + hour12 + ":" + min
+ " " + AM_PM);
}

@Override
public void onCancel() {

}
});
/**
* Pass Directly current time format it will return AM and PM if you set
* false
*/
custom.set24HourFormat(false);
/**
* Pass Directly current data and time to show when it pop up
*/
custom.setDate(Calendar.getInstance());

findViewById(R.id.button_date).setOnClickListener(
new OnClickListener() {

@Override
public void onClick(View v) {
custom.showDialog();
}
});
}

CustomDateTimePicker custom;

@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}

CustomDateTimePicker.java

public class CustomDateTimePicker implements OnClickListener {
private DatePicker datePicker;
private TimePicker timePicker;
private ViewSwitcher viewSwitcher;

private final int SET_DATE = 100, SET_TIME = 101, SET = 102, CANCEL = 103;

private Button btn_setDate, btn_setTime, btn_set, btn_cancel;

private Calendar calendar_date = null;

private Activity activity;

private ICustomDateTimeListener iCustomDateTimeListener = null;

private Dialog dialog;

private boolean is24HourView = true, isAutoDismiss = true;

private int selectedHour, selectedMinute;

public CustomDateTimePicker(Activity a,
ICustomDateTimeListener customDateTimeListener) {
activity = a;
iCustomDateTimeListener = customDateTimeListener;

dialog = new Dialog(activity);
dialog.setOnDismissListener(new OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
resetData();
}
});

dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
View dialogView = getDateTimePickerLayout();
dialog.setContentView(dialogView);
}

public View getDateTimePickerLayout() {
LinearLayout.LayoutParams linear_match_wrap = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT);
LinearLayout.LayoutParams linear_wrap_wrap = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
FrameLayout.LayoutParams frame_match_wrap = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.WRAP_CONTENT);

LinearLayout.LayoutParams button_params = new LinearLayout.LayoutParams(
0, LinearLayout.LayoutParams.WRAP_CONTENT, 1.0f);

LinearLayout linear_main = new LinearLayout(activity);
linear_main.setLayoutParams(linear_match_wrap);
linear_main.setOrientation(LinearLayout.VERTICAL);
linear_main.setGravity(Gravity.CENTER);

LinearLayout linear_child = new LinearLayout(activity);
linear_child.setLayoutParams(linear_wrap_wrap);
linear_child.setOrientation(LinearLayout.VERTICAL);

LinearLayout linear_top = new LinearLayout(activity);
linear_top.setLayoutParams(linear_match_wrap);

btn_setDate = new Button(activity);
btn_setDate.setLayoutParams(button_params);
btn_setDate.setText("Set Date");
btn_setDate.setId(SET_DATE);
btn_setDate.setOnClickListener(this);

btn_setTime = new Button(activity);
btn_setTime.setLayoutParams(button_params);
btn_setTime.setText("Set Time");
btn_setTime.setId(SET_TIME);
btn_setTime.setOnClickListener(this);

linear_top.addView(btn_setDate);
linear_top.addView(btn_setTime);

viewSwitcher = new ViewSwitcher(activity);
viewSwitcher.setLayoutParams(frame_match_wrap);

datePicker = new DatePicker(activity);
timePicker = new TimePicker(activity);
timePicker.setOnTimeChangedListener(new OnTimeChangedListener() {
@Override
public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {
selectedHour = hourOfDay;
selectedMinute = minute;
}
});

viewSwitcher.addView(timePicker);
viewSwitcher.addView(datePicker);

LinearLayout linear_bottom = new LinearLayout(activity);
linear_match_wrap.topMargin = 8;
linear_bottom.setLayoutParams(linear_match_wrap);

btn_set = new Button(activity);
btn_set.setLayoutParams(button_params);
btn_set.setText("Set");
btn_set.setId(SET);
btn_set.setOnClickListener(this);

btn_cancel = new Button(activity);
btn_cancel.setLayoutParams(button_params);
btn_cancel.setText("Cancel");
btn_cancel.setId(CANCEL);
btn_cancel.setOnClickListener(this);

linear_bottom.addView(btn_set);
linear_bottom.addView(btn_cancel);

linear_child.addView(linear_top);
linear_child.addView(viewSwitcher);
linear_child.addView(linear_bottom);

linear_main.addView(linear_child);

return linear_main;
}

public void showDialog() {
if (!dialog.isShowing()) {
if (calendar_date == null)
calendar_date = Calendar.getInstance();

selectedHour = calendar_date.get(Calendar.HOUR_OF_DAY);
selectedMinute = calendar_date.get(Calendar.MINUTE);

timePicker.setIs24HourView(is24HourView);
timePicker.setCurrentHour(selectedHour);
timePicker.setCurrentMinute(selectedMinute);

datePicker.updateDate(calendar_date.get(Calendar.YEAR),
calendar_date.get(Calendar.MONTH),
calendar_date.get(Calendar.DATE));

dialog.show();

btn_setDate.performClick();
}
}

public void setAutoDismiss(boolean isAutoDismiss) {
this.isAutoDismiss = isAutoDismiss;
}

public void dismissDialog() {
if (!dialog.isShowing())
dialog.dismiss();
}

public void setDate(Calendar calendar) {
if (calendar != null)
calendar_date = calendar;
}

public void setDate(Date date) {
if (date != null) {
calendar_date = Calendar.getInstance();
calendar_date.setTime(date);
}
}

public void setDate(int year, int month, int day) {
if (month < 12 && month >= 0 && day < 32 && day >= 0 && year > 100
&& year < 3000) {
calendar_date = Calendar.getInstance();
calendar_date.set(year, month, day);
}

}

public void setTimeIn24HourFormat(int hourIn24Format, int minute) {
if (hourIn24Format < 24 && hourIn24Format >= 0 && minute >= 0
&& minute < 60) {
if (calendar_date == null)
calendar_date = Calendar.getInstance();

calendar_date.set(calendar_date.get(Calendar.YEAR),
calendar_date.get(Calendar.MONTH),
calendar_date.get(Calendar.DAY_OF_MONTH), hourIn24Format,
minute);

is24HourView = true;
}
}

public void setTimeIn12HourFormat(int hourIn12Format, int minute,
boolean isAM) {
if (hourIn12Format < 13 && hourIn12Format > 0 && minute >= 0
&& minute < 60) {
if (hourIn12Format == 12)
hourIn12Format = 0;

int hourIn24Format = hourIn12Format;

if (!isAM)
hourIn24Format += 12;

if (calendar_date == null)
calendar_date = Calendar.getInstance();

calendar_date.set(calendar_date.get(Calendar.YEAR),
calendar_date.get(Calendar.MONTH),
calendar_date.get(Calendar.DAY_OF_MONTH), hourIn24Format,
minute);

is24HourView = false;
}
}

public void set24HourFormat(boolean is24HourFormat) {
is24HourView = is24HourFormat;
}

public interface ICustomDateTimeListener {
public void onSet(Dialog dialog, Calendar calendarSelected,
Date dateSelected, int year, String monthFullName,
String monthShortName, int monthNumber, int date,
String weekDayFullName, String weekDayShortName, int hour24,
int hour12, int min, int sec, String AM_PM);

public void onCancel();
}

@Override
public void onClick(View v) {
switch (v.getId()) {
case SET_DATE:
btn_setTime.setEnabled(true);
btn_setDate.setEnabled(false);
viewSwitcher.showNext();
break;

case SET_TIME:
btn_setTime.setEnabled(false);
btn_setDate.setEnabled(true);
viewSwitcher.showPrevious();
break;

case SET:
if (iCustomDateTimeListener != null) {
int month = datePicker.getMonth();
int year = datePicker.getYear();
int day = datePicker.getDayOfMonth();

calendar_date.set(year, month, day, selectedHour,
selectedMinute);

iCustomDateTimeListener.onSet(dialog, calendar_date,
calendar_date.getTime(), calendar_date
.get(Calendar.YEAR),
getMonthFullName(calendar_date.get(Calendar.MONTH)),
getMonthShortName(calendar_date.get(Calendar.MONTH)),
calendar_date.get(Calendar.MONTH), calendar_date
.get(Calendar.DAY_OF_MONTH),
getWeekDayFullName(calendar_date
.get(Calendar.DAY_OF_WEEK)),
getWeekDayShortName(calendar_date
.get(Calendar.DAY_OF_WEEK)), calendar_date
.get(Calendar.HOUR_OF_DAY),
getHourIn12Format(calendar_date
.get(Calendar.HOUR_OF_DAY)), calendar_date
.get(Calendar.MINUTE), calendar_date
.get(Calendar.SECOND), getAMPM(calendar_date));
}
if (dialog.isShowing() && isAutoDismiss)
dialog.dismiss();
break;

case CANCEL:
if (iCustomDateTimeListener != null)
iCustomDateTimeListener.onCancel();
if (dialog.isShowing())
dialog.dismiss();
break;
}
}

/**
* @param date
* date in String
* @param fromFormat
* format of your <b>date</b> eg: if your date is 2011-07-07
* 09:09:09 then your format will be <b>yyyy-MM-dd hh:mm:ss</b>
* @param toFormat
* format to which you want to convert your <b>date</b> eg: if
* required format is 31 July 2011 then the toFormat should be
* <b>d MMMM yyyy</b>
* @return formatted date
*/
public static String convertDate(String date, String fromFormat,
String toFormat) {
try {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(fromFormat);
Date d = simpleDateFormat.parse(date);
Calendar calendar = Calendar.getInstance();
calendar.setTime(d);

simpleDateFormat = new SimpleDateFormat(toFormat);
simpleDateFormat.setCalendar(calendar);
date = simpleDateFormat.format(calendar.getTime());

} catch (Exception e) {
e.printStackTrace();
}

return date;
}

private String getMonthFullName(int monthNumber) {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.MONTH, monthNumber);

SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MMMM");
simpleDateFormat.setCalendar(calendar);
String monthName = simpleDateFormat.format(calendar.getTime());

return monthName;
}

private String getMonthShortName(int monthNumber) {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.MONTH, monthNumber);

SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MMM");
simpleDateFormat.setCalendar(calendar);
String monthName = simpleDateFormat.format(calendar.getTime());

return monthName;
}

private String getWeekDayFullName(int weekDayNumber) {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.DAY_OF_WEEK, weekDayNumber);

SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEEE");
simpleDateFormat.setCalendar(calendar);
String weekName = simpleDateFormat.format(calendar.getTime());

return weekName;
}

private String getWeekDayShortName(int weekDayNumber) {
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.DAY_OF_WEEK, weekDayNumber);

SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EE");
simpleDateFormat.setCalendar(calendar);
String weekName = simpleDateFormat.format(calendar.getTime());

return weekName;
}

private int getHourIn12Format(int hour24) {
int hourIn12Format = 0;

if (hour24 == 0)
hourIn12Format = 12;
else if (hour24 <= 12)
hourIn12Format = hour24;
else
hourIn12Format = hour24 - 12;

return hourIn12Format;
}

private String getAMPM(Calendar calendar) {
String ampm = (calendar.get(Calendar.AM_PM) == (Calendar.AM)) ? "AM"
: "PM";
return ampm;
}

private void resetData() {
calendar_date = null;
is24HourView = true;
}

public static String pad(int integerToPad) {
if (integerToPad >= 10 || integerToPad < 0)
return String.valueOf(integerToPad);
else
return "0" + String.valueOf(integerToPad);
}
}

activity_main.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<TextView
android:id="@+id/lablel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:padding="@dimen/padding_medium"
android:text="@string/hello_world"
android:textColor="#000"
android:textSize="20dp"
tools:context=".MainActivity" />

<Button
android:id="@+id/button_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/lablel"
android:layout_centerHorizontal="true"
android:layout_marginTop="80dp"
android:text="Date Time Picker" />

</RelativeLayout>

Sample Image

How do I create a date/time picker in a separate class and use it in various classes?

If you are using Fragments use this class:

public class DatePickerDialogFragment extends DialogFragment {

private Context context;
private Calendar MinDate, MaxDate;
private OnDateSetListener mDateSetListener;

public DatePickerDialogFragment() {
}

public DatePickerDialogFragment(OnDateSetListener callback, Calendar MinDate, Calendar MaxDate, Context context) {
mDateSetListener = callback;
this.MinDate = MinDate;
this.MaxDate = MaxDate;
this.context = context;
}
public DatePickerDialogFragment(OnDateSetListener callback, Context context) {
mDateSetListener = callback;
this.context = context;
}
DatePickerDialog dd;
DatePicker dp;

public Dialog onCreateDialog(Bundle savedInstanceState) {
Calendar cal = Calendar.getInstance();

dd = new DatePickerDialog(getActivity(), this.mDateSetListener, cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH));
dd.setOnShowListener(new DialogInterface.OnShowListener() {
@Override
public void onShow(DialogInterface dialog) {
try {
if (MinDate!=null&&MaxDate!=null) {
((DatePickerDialog) dialog).getDatePicker().setMaxDate(MaxDate.getTimeInMillis());
((DatePickerDialog) dialog).getDatePicker().setMinDate(MinDate.getTimeInMillis());

}
} catch (NullPointerException e) {
dialog.dismiss();
e.printStackTrace();
}
}
});
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
return dd;
}

@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
}

}

And use it like:

dialogFragment = new DatePickerDialogFragment(new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
Calendar cal = GregorianCalendar.getInstance();
cal.set( year, monthOfYear, dayOfMonth);
String currentDateandTime = sdf.format( cal.getTime());
et_date.setText(currentDateandTime);
}
}, context);

And Show it like

dialogFragment.show(getFragmentManager(), "Date");

Date + Time Picker in DialogFragment implements OnDateChangedListener and OnTimeChangedListener

I want to say thanks to everyone for helping me out and leading me in the right direction. I now have a much better understanding of Android. Here's the full working class:

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.DatePicker;
import android.widget.DatePicker.OnDateChangedListener;
import android.widget.TimePicker;
import android.widget.TimePicker.OnTimeChangedListener;

public class DateTimeDialogFragment extends DialogFragment implements OnDateChangedListener, OnTimeChangedListener {
// Define constants for date-time picker.
public final static int DATE_PICKER = 1;
public final static int TIME_PICKER = 2;
public final static int DATE_TIME_PICKER = 3;

// DatePicker reference
private DatePicker datePicker;

// TimePicker reference
private TimePicker timePicker;

// Calendar reference
private Calendar mCalendar;

// Define activity
private Activity activity;

// Define Dialog type
private int DialogType;

// Define Dialog view
private View mView;

// Constructor start
public DateTimeDialogFragment(Activity activity) {
this(activity, DATE_TIME_PICKER);
}

public DateTimeDialogFragment(Activity activity, int DialogType) {
this.activity = activity;
this.DialogType = DialogType;

// Inflate layout for the view
// Pass null as the parent view because its going in the dialog layout
LayoutInflater inflater = activity.getLayoutInflater();
mView = inflater.inflate(R.layout.date_time_dialog, null);

// Grab a Calendar instance
mCalendar = Calendar.getInstance();

// Init date picker
datePicker = (DatePicker) mView.findViewById(R.id.DatePicker);
datePicker.init(mCalendar.get(Calendar.YEAR), mCalendar.get(Calendar.MONTH), mCalendar.get(Calendar.DAY_OF_MONTH), this);

// Init time picker
timePicker = (TimePicker) mView.findViewById(R.id.TimePicker);

// Set default Calendar and Time Style
setIs24HourView(true);
setCalendarViewShown(false);

switch (DialogType) {
case DATE_PICKER:
timePicker.setVisibility(View.GONE);
break;
case TIME_PICKER:
datePicker.setVisibility(View.GONE);
break;
}
}

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {

// Use the Builder class for convenient dialog construction
Builder builder = new AlertDialog.Builder(activity);

// Set the layout for the dialog
builder.setView(mView);

// Set title of dialog
builder.setMessage("Set Date")
// Set Ok button
.setPositiveButton("Set",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// User ok the dialog
}
})
// Set Cancel button
.setNegativeButton("Cancel",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// User cancelled the dialog
DateTimeDialogFragment.this.getDialog().cancel();
}
});

// Create the AlertDialog object and return it
return builder.create();
}

@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
timePicker.setOnTimeChangedListener(this);
}

// Convenience wrapper for internal Calendar instance
public int get(final int field) {
return mCalendar.get(field);
}

// Convenience wrapper for internal Calendar instance
public long getDateTimeMillis() {
return mCalendar.getTimeInMillis();
}

// Convenience wrapper for internal TimePicker instance
public void setIs24HourView(boolean is24HourView) {
timePicker.setIs24HourView(is24HourView);
}

// Convenience wrapper for internal TimePicker instance
public boolean is24HourView() {
return timePicker.is24HourView();
}

// Convenience wrapper for internal DatePicker instance
public void setCalendarViewShown(boolean calendarView) {
datePicker.setCalendarViewShown(calendarView);
}

// Convenience wrapper for internal DatePicker instance
public boolean CalendarViewShown() {
return datePicker.getCalendarViewShown();
}

// Convenience wrapper for internal DatePicker instance
public void updateDate(int year, int monthOfYear, int dayOfMonth) {
datePicker.updateDate(year, monthOfYear, dayOfMonth);
}

// Convenience wrapper for internal TimePicker instance
public void updateTime(int currentHour, int currentMinute) {
timePicker.setCurrentHour(currentHour);
timePicker.setCurrentMinute(currentMinute);
}

public String getDateTime() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US);
return sdf.format(mCalendar.getTime());
}

// Called every time the user changes DatePicker values
@Override
public void onDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
// Update the internal Calendar instance
mCalendar.set(year, monthOfYear, dayOfMonth, mCalendar.get(Calendar.HOUR_OF_DAY), mCalendar.get(Calendar.MINUTE));
}

// Called every time the user changes TimePicker values
@Override
public void onTimeChanged(TimePicker view, int hourOfDay, int minute) {
// Update the internal Calendar instance
mCalendar.set(mCalendar.get(Calendar.YEAR), mCalendar.get(Calendar.MONTH), mCalendar.get(Calendar.DAY_OF_MONTH), hourOfDay, minute);
}
}

showing a DatePickerDialog inside a Dialogfragment

The solution isn't about the datepickerdialog at all. I had a switch-case in my fragment that manages the events of clicks. I accidentally forgot to put a break; after the case which caused a flow to the other events (one of them was dismiss();), and that's why the datepickerdialog also dismissed my fragment.



Related Topics



Leave a reply



Submit