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
call View.onAttachedToWindow() method
This commit is contained in:
@@ -75,6 +75,9 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
index = children.size();
|
||||
children.add(index, child);
|
||||
native_addView(widget, child.widget, index, params);
|
||||
if (isAttachedToWindow()) {
|
||||
child.onAttachedToWindow();
|
||||
}
|
||||
requestLayout();
|
||||
}
|
||||
|
||||
@@ -291,6 +294,14 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
|
||||
|
||||
public void requestDisallowInterceptTouchEvent(boolean disallowIntercept) {}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
for (View child: children) {
|
||||
child.onAttachedToWindow();
|
||||
}
|
||||
}
|
||||
|
||||
public static class LayoutParams {
|
||||
public static final int FILL_PARENT = -1;
|
||||
public static final int MATCH_PARENT = -1;
|
||||
|
||||
Reference in New Issue
Block a user