MS
Size: a a a
MS
A
EZ
MS
A
A
MS
V🇺
MG
A
A
MG
MG
int analyze(View root, int depth) {
if (root instanceof ViewGroup) {
ViewGroup viewGroup = (ViewGroup) root;
int r = set(viewGroup, depth);
int childCount = viewGroup.getChildCount();
if (childCount != 0) {
children = new ArrayList<>();
for (int i = 0; i < childCount; i++) {
ViewHierarchy viewHierarchy = new ViewHierarchy();
int r2 = viewHierarchy.analyze(viewGroup.getChildAt(i), depth + 1);
if (r2 > r) r = r2;
children.add(viewHierarchy);
}
}
return r;
} else return set(root, depth);
}MG
MG
private void computeOffsets(ViewHierarchy parent) {
x = view.getX();
y = view.getY();
if (parent != null) {
x += parent.x;
y += parent.y;
}
for (ViewHierarchy hierarchy : this) {
hierarchy.computeOffsets(this);
}
}AT
e
MS
e