use of com.taobao.luaview.view.interfaces.ILVView in project LuaViewSDK by alibaba.
the class DestroyUtil method clearViews.
public static void clearViews(ViewGroup viewGroup) {
LogUtil.d("onDestory", "clearViews", viewGroup);
if (viewGroup != null) {
View child = null;
UDView udView = null;
for (int i = 0; i < viewGroup.getChildCount(); i++) {
child = viewGroup.getChildAt(i);
if (child instanceof ViewGroup) {
clearViews((ViewGroup) child);
} else if (child instanceof ILVView) {
udView = ((ILVView) child).getUserdata();
if (udView != null) {
udView.onDestroy();
}
}
}
if (viewGroup instanceof ILVView) {
udView = ((ILVView) viewGroup).getUserdata();
if (udView != null) {
udView.onDestroy();
}
}
}
}