Merge "Fix selecting with touch in multi-window." into nyc-dev
am: fbd4b55
* commit 'fbd4b558d5630c83f5bb820328bb606a89b68577':
Fix selecting with touch in multi-window.
Change-Id: I99e3ee0bd9cf5b53533ef841ed61691cda9d940f
This commit is contained in:
@@ -139,8 +139,10 @@ public abstract class DocumentHolder
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Do everything in global coordinates - it makes things simpler.
|
// Do everything in global coordinates - it makes things simpler.
|
||||||
Rect rect = new Rect();
|
int[] coords = new int[2];
|
||||||
mSelectionHotspot.getGlobalVisibleRect(rect);
|
mSelectionHotspot.getLocationOnScreen(coords);
|
||||||
|
Rect rect = new Rect(coords[0], coords[1], coords[0] + mSelectionHotspot.getWidth(),
|
||||||
|
coords[1] + mSelectionHotspot.getHeight());
|
||||||
|
|
||||||
// If the tap occurred within the icon rect, consider it a selection.
|
// If the tap occurred within the icon rect, consider it a selection.
|
||||||
if (rect.contains((int) event.getRawX(), (int) event.getRawY())) {
|
if (rect.contains((int) event.getRawX(), (int) event.getRawY())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user