From 43bc848441ba0a7316269cfbf649675d07c99b0d Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Mon, 11 Nov 2019 08:29:44 +0200 Subject: [PATCH] DatePickerFragment: dismiss before invoking the date picked listener may want to do something with the focus --- .../main/java/net/ktnx/mobileledger/ui/DatePickerFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/DatePickerFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/DatePickerFragment.java index 6f71acee..0c4a1c1b 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/DatePickerFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/DatePickerFragment.java @@ -88,9 +88,9 @@ public class DatePickerFragment extends AppCompatDialogFragment @Override public void onSelectedDayChange(@NonNull CalendarView view, int year, int month, int dayOfMonth) { + this.dismiss(); if (onDatePickedListener != null) onDatePickedListener.onDatePicked(year, month, dayOfMonth); - this.dismiss(); } public void setOnDatePickedListener(DatePickedListener listener) { onDatePickedListener = listener; -- 2.39.5