]> git.ktnx.net Git - mobile-ledger.git/commitdiff
DatePickerFragment: dismiss before invoking the date picked listener
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 11 Nov 2019 06:29:44 +0000 (08:29 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Mon, 11 Nov 2019 06:29:44 +0000 (08:29 +0200)
may want to do something with the focus

app/src/main/java/net/ktnx/mobileledger/ui/DatePickerFragment.java

index 6f71acee2241e2646b633a29b2d0b1dae876dcde..0c4a1c1b72c506167ce5a93cf978b218abe97b6e 100644 (file)
@@ -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;