From: Damyan Ivanov Date: Mon, 11 Nov 2019 06:29:44 +0000 (+0200) Subject: DatePickerFragment: dismiss before invoking the date picked listener X-Git-Tag: v0.11.0~77 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=43bc848441ba0a7316269cfbf649675d07c99b0d;p=mobile-ledger.git DatePickerFragment: dismiss before invoking the date picked listener may want to do something with the focus --- 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;