Skip to content

Commit

Permalink
fix(android): properly remove subviews (#762)
Browse files Browse the repository at this point in the history
  • Loading branch information
femmon authored Oct 18, 2023
1 parent 2a2925e commit a1ab2fd
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ public void removeView(View view) {

@Override
public void removeViewAt(int index) {
if (index > 0) return;
View child = getChildAt(index);
super.removeView(child);
subviews.remove(index);
if (wrap != null && wrap.getChildCount() > 0) {
if (wrap != null) {
for (int i = 0; i < wrap.getChildCount(); i++) {
wrap.removeViewAt(i);
if (i == index) {
wrap.removeViewAt(i);
}
}
}
}
Expand Down

0 comments on commit a1ab2fd

Please sign in to comment.