Skip to content

Commit

Permalink
Issue #28: Improve Auto complete vertical offset calculation to work …
Browse files Browse the repository at this point in the history
…correctly on android 6 and below too
  • Loading branch information
AmrDeveloper committed May 11, 2022
1 parent 9ebef67 commit e365f9e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,8 @@ public void showDropDown() {
}

final Rect displayFrame = new Rect();
getWindowVisibleDisplayFrame(displayFrame);
getGlobalVisibleRect(displayFrame);

int displayFrameHeight = displayFrame.height();

int verticalOffset = lineButton + dropDownHeight;
Expand All @@ -691,7 +692,7 @@ public void showDropDown() {
}

setDropDownHeight(dropDownHeight);
setDropDownVerticalOffset(verticalOffset);
setDropDownVerticalOffset(verticalOffset - displayFrameHeight - dropDownHeight);
setDropDownHorizontalOffset((int) layout.getPrimaryHorizontal(position));

super.showDropDown();
Expand Down

0 comments on commit e365f9e

Please sign in to comment.