Skip to content

Commit

Permalink
Merge pull request #636 from opensrp/fix-datepicker-anr
Browse files Browse the repository at this point in the history
Fix Date Picker ANR
  • Loading branch information
ndegwamartin committed Jun 17, 2022
2 parents ed8d2a4 + 4b1eac7 commit 96b4667
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,11 @@ private void resetPicker(NumberPicker numberPicker, int value) {
numberPicker.setMaxValue(cacheMax);
}

// Avoid the case where minV and max cache value are same
if (cacheMax == cacheMin) {
numberPicker.setMinValue(value);
numberPicker.setMaxValue(value);
}

if (numberPicker.getId() == R.id.year) {

Expand Down

0 comments on commit 96b4667

Please sign in to comment.