mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-05 21:58:44 +08:00
ViewGroup::removeAllViewsInLayout ,mChildren.clear must be called earlier to avoid some crash
This commit is contained in:
parent
b894f260bb
commit
6b8a7bbd03
@ -1550,6 +1550,7 @@ void ViewGroup::removeAllViewsInLayout() {
|
||||
mChildren[i] = nullptr;//cant delete mChilden[i]
|
||||
}
|
||||
|
||||
mChildren.clear();
|
||||
if (mDefaultFocus) clearDefaultFocus(mDefaultFocus);
|
||||
|
||||
if (mFocusedInCluster) clearFocusedInCluster(mFocusedInCluster);
|
||||
@ -1560,7 +1561,6 @@ void ViewGroup::removeAllViewsInLayout() {
|
||||
notifyGlobalFocusCleared(focused);
|
||||
}
|
||||
}
|
||||
mChildren.clear();
|
||||
}
|
||||
|
||||
bool ViewGroup::removeViewInternal(View* view){
|
||||
|
Loading…
Reference in New Issue
Block a user