[go: nahoru, domu]

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

Commit

Permalink
[WEEX][Android] Weex Bugfix For Scroller Remove Failed Because Of Edi…
Browse files Browse the repository at this point in the history
…t Of Scroller Touch Event (#2005)
  • Loading branch information
gubaojian authored and YorkShen committed Jan 8, 2019
1 parent 34598da commit 21e9e81
Showing 1 changed file with 8 additions and 1 deletion.
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

0 comments on commit 21e9e81

Please sign in to comment.