am 99de2459: Merge "Respect child drawing order when dispatching touch events" into jb-mr1-dev
* commit '99de2459e200e0c86d55d5eee7ea000fd030990f': Respect child drawing order when dispatching touch events
This commit is contained in:
@@ -1723,8 +1723,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
final float x = event.getX();
|
||||
final float y = event.getY();
|
||||
|
||||
final boolean customOrder = isChildrenDrawingOrderEnabled();
|
||||
for (int i = childrenCount - 1; i >= 0; i--) {
|
||||
final View child = children[i];
|
||||
final int childIndex = customOrder ? getChildDrawingOrder(childrenCount, i) : i;
|
||||
final View child = children[childIndex];
|
||||
if (!canViewReceivePointerEvents(child)
|
||||
|| !isTransformedTouchPointInView(x, y, child, null)) {
|
||||
continue;
|
||||
@@ -1851,8 +1853,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
final float x = ev.getX(actionIndex);
|
||||
final float y = ev.getY(actionIndex);
|
||||
|
||||
final boolean customOrder = isChildrenDrawingOrderEnabled();
|
||||
for (int i = childrenCount - 1; i >= 0; i--) {
|
||||
final View child = children[i];
|
||||
final int childIndex = customOrder ?
|
||||
getChildDrawingOrder(childrenCount, i) : i;
|
||||
final View child = children[childIndex];
|
||||
if (!canViewReceivePointerEvents(child)
|
||||
|| !isTransformedTouchPointInView(x, y, child, null)) {
|
||||
continue;
|
||||
@@ -1870,7 +1875,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
if (dispatchTransformedTouchEvent(ev, false, child, idBitsToAssign)) {
|
||||
// Child wants to receive touch within its bounds.
|
||||
mLastTouchDownTime = ev.getDownTime();
|
||||
mLastTouchDownIndex = i;
|
||||
mLastTouchDownIndex = childIndex;
|
||||
mLastTouchDownX = ev.getX();
|
||||
mLastTouchDownY = ev.getY();
|
||||
newTouchTarget = addTouchTarget(child, idBitsToAssign);
|
||||
|
||||
Reference in New Issue
Block a user