Skip to content

Commit

Permalink
fix(android): update drawing order in add child
Browse files Browse the repository at this point in the history
  • Loading branch information
siguangli2018 authored and siguangli committed Aug 26, 2023
1 parent 2b0fe53 commit 1bec309
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ public void addChild(@NonNull RenderNode node, int index) {
index = (index < 0) ? 0 : Math.min(index, mChildren.size());
mChildren.add(index, node);
node.mParent = this;
// If has set z index in the child nodes, the rendering order needs to be rearranged
// after adding nodes
if (mDrawingOrder != null) {
setNodeFlag(FLAG_UPDATE_DRAWING_ORDER);
}
}

public void setLazy(boolean isLazy) {
Expand Down

0 comments on commit 1bec309

Please sign in to comment.