Skip to content

Commit

Permalink
fix(android): Guard against negative DropwDownHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
Berstanio committed Oct 22, 2023
1 parent 8e9c42b commit e3bd896
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,8 @@ public void showDropDown () {
int size = 165 * count;
if (size > relativeLayout.getHeight() + relativeLayout.getY() - getHeight())
size = (int)(relativeLayout.getHeight() + relativeLayout.getY() - getHeight());
if (size != 0) setDropDownHeight(size);
if (size > 0)
setDropDownHeight(size);
setDropDownVerticalOffset(-getDropDownHeight() - getHeight());
setDropDownWidth((int)(getWidth() * relativeLayout.getScaleX()));
super.showDropDown();
Expand Down

0 comments on commit e3bd896

Please sign in to comment.