You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
ViewGroup: hide detached views
This commit is contained in:
@@ -143,6 +143,7 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
|||||||
|
|
||||||
public void detachViewFromParent(int index) {
|
public void detachViewFromParent(int index) {
|
||||||
View child = children.remove(index);
|
View child = children.remove(index);
|
||||||
|
child.native_setVisibility(child.widget, GONE, 0);
|
||||||
child.parent = null;
|
child.parent = null;
|
||||||
detachedChildren.add(child);
|
detachedChildren.add(child);
|
||||||
}
|
}
|
||||||
@@ -159,6 +160,7 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
|||||||
if (index < 0)
|
if (index < 0)
|
||||||
index = children.size();
|
index = children.size();
|
||||||
children.add(index, view);
|
children.add(index, view);
|
||||||
|
view.native_setVisibility(view.widget, view.getVisibility(), view.getAlpha());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void removeDetachedView(View child, boolean animate) {
|
protected void removeDetachedView(View child, boolean animate) {
|
||||||
|
|||||||
Reference in New Issue
Block a user