Loading core/java/android/view/ViewGroupOverlay.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -47,7 +47,8 @@ public class ViewGroupOverlay extends ViewOverlay { * animation effect.</p> * animation effect.</p> * * * <p>If the view has a parent, the view will be removed from that parent * <p>If the view has a parent, the view will be removed from that parent * before being added to the overlay. Also, the view will be repositioned * before being added to the overlay. Also, if that parent is attached * in the current view hierarchy, the view will be repositioned * such that it is in the same relative location inside the activity. For * such that it is in the same relative location inside the activity. For * example, if the view's current parent lies 100 pixels to the right * example, if the view's current parent lies 100 pixels to the right * and 200 pixels down from the origin of the overlay's * and 200 pixels down from the origin of the overlay's Loading core/java/android/view/ViewOverlay.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -157,7 +157,8 @@ public class ViewOverlay { public void add(View child) { public void add(View child) { if (child.getParent() instanceof ViewGroup) { if (child.getParent() instanceof ViewGroup) { ViewGroup parent = (ViewGroup) child.getParent(); ViewGroup parent = (ViewGroup) child.getParent(); if (parent != mHostView) { if (parent != mHostView && parent.getParent() != null && parent.mAttachInfo != null) { // Moving to different container; figure out how to position child such that // Moving to different container; figure out how to position child such that // it is in the same location on the screen // it is in the same location on the screen int[] parentLocation = new int[2]; int[] parentLocation = new int[2]; Loading Loading
core/java/android/view/ViewGroupOverlay.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -47,7 +47,8 @@ public class ViewGroupOverlay extends ViewOverlay { * animation effect.</p> * animation effect.</p> * * * <p>If the view has a parent, the view will be removed from that parent * <p>If the view has a parent, the view will be removed from that parent * before being added to the overlay. Also, the view will be repositioned * before being added to the overlay. Also, if that parent is attached * in the current view hierarchy, the view will be repositioned * such that it is in the same relative location inside the activity. For * such that it is in the same relative location inside the activity. For * example, if the view's current parent lies 100 pixels to the right * example, if the view's current parent lies 100 pixels to the right * and 200 pixels down from the origin of the overlay's * and 200 pixels down from the origin of the overlay's Loading
core/java/android/view/ViewOverlay.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -157,7 +157,8 @@ public class ViewOverlay { public void add(View child) { public void add(View child) { if (child.getParent() instanceof ViewGroup) { if (child.getParent() instanceof ViewGroup) { ViewGroup parent = (ViewGroup) child.getParent(); ViewGroup parent = (ViewGroup) child.getParent(); if (parent != mHostView) { if (parent != mHostView && parent.getParent() != null && parent.mAttachInfo != null) { // Moving to different container; figure out how to position child such that // Moving to different container; figure out how to position child such that // it is in the same location on the screen // it is in the same location on the screen int[] parentLocation = new int[2]; int[] parentLocation = new int[2]; Loading