Merge "Drag and drop from the search view on the overview screen." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
8561c5690f
@@ -100,6 +100,7 @@ import java.lang.reflect.Method;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
@@ -276,8 +277,12 @@ public final class Utilities {
|
||||
*/
|
||||
public static void mapCoordInSelfToDescendant(View descendant, View root, float[] coord) {
|
||||
sMatrix.reset();
|
||||
//TODO(b/307488755) when implemented this check should be removed
|
||||
if (!Objects.equals(descendant.getWindowId(), root.getWindowId())) {
|
||||
return;
|
||||
}
|
||||
View v = descendant;
|
||||
while(v != root) {
|
||||
while (v != root) {
|
||||
sMatrix.postTranslate(-v.getScrollX(), -v.getScrollY());
|
||||
sMatrix.postConcat(v.getMatrix());
|
||||
sMatrix.postTranslate(v.getLeft(), v.getTop());
|
||||
|
||||
@@ -540,7 +540,7 @@ public abstract class DragController<T extends ActivityContext>
|
||||
accepted = true;
|
||||
}
|
||||
}
|
||||
final View dropTargetAsView = dropTarget instanceof View ? (View) dropTarget : null;
|
||||
final View dropTargetAsView = dropTarget.getDropView();
|
||||
dispatchDropComplete(dropTargetAsView, accepted);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user