Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 81f08086 authored by Gilles Debunne's avatar Gilles Debunne
Browse files

Text selection handles correctly scroll

Bug 3416154

The origin of the problem is new display optimisations that enable
a scrollView to be scrolled without calling the onDraw method of its
children. As a result, the handles' positions were not updated on scroll.

DropDown popup menu have an integrated scroll listener that will fix the
problem. Using these indead is the first part of the solution.

The next problem is that when they get hidden, these popups try to move their
parent (the TextView in our case) which creates a scroll conflict. Fixed by
overriding findDropDownPosition.

Finally, when the handles get invisible, a new scroll listener has to be
installed that will show them back in case the view is scrolled back.

This is also an important step to fix Bug 3441308 (selectable text in list
views).

Debugging find outs:
Small optimization in PopupWindow to avoir unregistering then registering
back the listener when it is updated.

getHandle().show(); is not needed since updatePosition will do it through
moveTo().

Change-Id: I6bf6a3649538328257734ed1e651b23b889d65d9
parent 59b8a326
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment