Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Issue 2057403002: Fix DropdownPopupWindow's position in Android N. (Closed)

Created:
4 years, 6 months ago by hush (inactive)
Modified:
4 years, 6 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2743
Target Ref:
refs/pending/branch-heads/2743
Project:
chromium
Visibility:
Public.

Description

Fix DropdownPopupWindow's position in Android N. In Android N, the framework will read view.getLeft() and view.getTop() to determine where to put the drop down, and if the anchor view is not on screen, the parent view will be scrolled to make it on screen (by means of requestChildRectangleOnScreen). setLayoutParams() is not enough to change left and top values of the anchorView immediately. Show()ing the ListPopupWindow immediately after setLayoutParams() will show the popup window in the wrong location, and also cause the parent view to be improperly scrolled. Call postShow() to put show() after when the layout of the anchor view is changed. Initial selection has to be set after show() is actually called, because getListView() is null until the ListPopupWindow is shown. BUG=614746 Review-Url: https://codereview.chromium.org/2049523005 Cr-Commit-Position: refs/heads/master@{#399274} (cherry picked from commit 87634341cb230c465a1d2c5cdb09f79c0a97bc08) Committed: https://chromium.googlesource.com/chromium/src/+/80a41c4e6e833c56f88ba2a4ed755be308e6a66a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -6 lines) Patch
M content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java View 3 chunks +7 lines, -6 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/DropdownPopupWindow.java View 3 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
hush (inactive)
4 years, 6 months ago (2016-06-11 00:02:03 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
80a41c4e6e833c56f88ba2a4ed755be308e6a66a.

Powered by Google App Engine
This is Rietveld 408576698