@Test public void testSetVisibility() throws Exception { component.setProperty(Constants.Name.VISIBILITY,Constants.Value.HIDDEN); component.setProperty(Constants.Name.SRC,"http: component.setProperty(Constants.Name.VISIBILITY,Constants.Value.VISIBLE); }
@Override public void setVisibility(String visibility) { super.setVisibility(visibility); boolean visible = TextUtils.equals(visibility, Constants.Value.VISIBLE); if (!TextUtils.isEmpty(src) && visible) { if (mNestedInstance == null) { loadContent(); } else { mNestedInstance.onViewAppear(); } } if (!visible) { if (mNestedInstance != null) { mNestedInstance.onViewDisappear(); } } mIsVisible = visible; }
WXEmbed extends WXDiv implements WXSDKInstance.OnInstanceVisibleListener,NestedContainer { @Override public void setVisibility(String visibility) { super.setVisibility(visibility); boolean visible = TextUtils.equals(visibility, Constants.Value.VISIBLE); if (!TextUtils.isEmpty(src) && visible) { if (mNestedInstance == null) { loadContent(); } else { mNestedInstance.onViewAppear(); } } if (!visible) { if (mNestedInstance != null) { mNestedInstance.onViewDisappear(); } } mIsVisible = visible; } }
WXEmbed extends WXDiv implements WXSDKInstance.OnInstanceVisibleListener,NestedContainer { @Override public void setVisibility(String visibility) { super.setVisibility(visibility); boolean visible = TextUtils.equals(visibility, Constants.Value.VISIBLE); if (!TextUtils.isEmpty(src) && visible) { if (mNestedInstance == null) { loadContent(); } else { mNestedInstance.onViewAppear(); } } if (!visible) { if (mNestedInstance != null) { mNestedInstance.onViewDisappear(); } } mIsVisible = visible; } @Deprecated  WXEmbed(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, String instanceId, boolean isLazy);  WXEmbed(WXSDKInstance instance, WXDomObject node, WXVContainer parent); }
WXEmbed extends WXDiv implements WXSDKInstance.OnInstanceVisibleListener,NestedContainer { @Override public void setVisibility(String visibility) { super.setVisibility(visibility); boolean visible = TextUtils.equals(visibility, Constants.Value.VISIBLE); if (!TextUtils.isEmpty(src) && visible) { if (mNestedInstance == null) { loadContent(); } else { mNestedInstance.onViewAppear(); } } if (!visible) { if (mNestedInstance != null) { mNestedInstance.onViewDisappear(); } } mIsVisible = visible; } @Deprecated  WXEmbed(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, String instanceId, boolean isLazy);  WXEmbed(WXSDKInstance instance, WXDomObject node, WXVContainer parent); @Override void setOnNestEventListener(OnNestedInstanceEventListener listener); @Override ViewGroup getViewContainer(); @Override void renderNewURL(String url); String getOriginUrl(); void setOriginUrl(String originUrl); @WXComponentProp(name = Constants.Name.SRC) void setSrc(String src); String getSrc(); @Override void setVisibility(String visibility); @Override void destroy(); @Override void onAppear(); @Override void onDisappear(); }
WXEmbed extends WXDiv implements WXSDKInstance.OnInstanceVisibleListener,NestedContainer { @Override public void setVisibility(String visibility) { super.setVisibility(visibility); boolean visible = TextUtils.equals(visibility, Constants.Value.VISIBLE); if (!TextUtils.isEmpty(src) && visible) { if (mNestedInstance == null) { loadContent(); } else { mNestedInstance.onViewAppear(); } } if (!visible) { if (mNestedInstance != null) { mNestedInstance.onViewDisappear(); } } mIsVisible = visible; } @Deprecated  WXEmbed(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, String instanceId, boolean isLazy);  WXEmbed(WXSDKInstance instance, WXDomObject node, WXVContainer parent); @Override void setOnNestEventListener(OnNestedInstanceEventListener listener); @Override ViewGroup getViewContainer(); @Override void renderNewURL(String url); String getOriginUrl(); void setOriginUrl(String originUrl); @WXComponentProp(name = Constants.Name.SRC) void setSrc(String src); String getSrc(); @Override void setVisibility(String visibility); @Override void destroy(); @Override void onAppear(); @Override void onDisappear(); static final String ITEM_ID; }