Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[WEEX][Android] Weex Bugfix For Scroller Remove Failed Because Of Edit Of Scroller Touch Event #2005

Merged
merged 1 commit into from
Jan 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import android.view.Menu;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;

import com.taobao.weex.WXSDKInstance;
import com.taobao.weex.annotation.JSMethod;
import com.taobao.weex.common.Constants;
Expand Down Expand Up @@ -329,7 +331,12 @@ && getInstance().getRootView() != null
getInstance().removeFixedView(child.getHostView());
} else if (getRealView() != null) {
if (!child.isVirtualComponent()) {
getRealView().removeView(child.getHostView());
ViewParent parent = child.getHostView().getParent();
if(parent != null && parent instanceof ViewGroup){
((ViewGroup) parent).removeView(child.getHostView());
}else{
getRealView().removeView(child.getHostView());
}
} else {
child.removeVirtualComponent();
}
Expand Down