Skip to content

Commit 9ce13af

Browse files
committed
Don't intercept taps on menu items (fix cgeo#18405)
1 parent 72f2d07 commit 9ce13af

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

main/src/main/java/cgeo/geocaching/search/SearchUtils.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,11 @@ public static void handleDropDownVisibility(final Activity activity, final Searc
9393
if (activityViewroot != null) {
9494
activityViewroot.setOnInterceptTouchEventListener(ev -> {
9595
if (!searchView.isIconified() && searchView.getSuggestionsAdapter().getCount() > 0) {
96-
// Don't intercept touches inside the SearchView (allows long-press paste)
96+
// Don't intercept touches inside the SearchView (allows long-press paste) or menu item
9797
final int[] loc = new int[2];
9898
searchView.getLocationOnScreen(loc);
99-
final float x = ev.getRawX();
10099
final float y = ev.getRawY();
101-
if (x >= loc[0] && x <= loc[0] + searchView.getWidth()
102-
&& y >= loc[1] && y <= loc[1] + searchView.getHeight()) {
100+
if (y >= loc[1] && y <= loc[1] + searchView.getHeight()) {
103101
return false;
104102
}
105103
menuSearch.collapseActionView();

0 commit comments

Comments
 (0)