@Test public void testSetSrc() throws Exception { TestDomObject.setAttribute((WXDomObject)mWXImage.getDomObject(),PowerMockito.mock(WXAttr.class)); PowerMockito.when(mWXImage.getDomObject().getAttrs().getImageSharpen()).thenReturn(WXImageSharpen.SHARPEN); mWXImage.setSrc(""); }
@WXComponentProp(name = Constants.Name.SRC) public void setSrc(String src) { if (src == null) { return; } WXSDKInstance instance = getInstance(); Uri rewrited = instance.rewriteUri(Uri.parse(src), URIAdapter.IMAGE); if (Constants.Scheme.LOCAL.equals(rewrited.getScheme())) { setLocalSrc(rewrited); } else { setRemoteSrc(rewrited); } }
WXImage extends WXComponent<ImageView> { @WXComponentProp(name = Constants.Name.SRC) public void setSrc(String src) { if (src == null) { return; } WXSDKInstance instance = getInstance(); Uri rewrited = instance.rewriteUri(Uri.parse(src), URIAdapter.IMAGE); if (Constants.Scheme.LOCAL.equals(rewrited.getScheme())) { setLocalSrc(rewrited); } else { setRemoteSrc(rewrited); } } }
WXImage extends WXComponent<ImageView> { @WXComponentProp(name = Constants.Name.SRC) public void setSrc(String src) { if (src == null) { return; } WXSDKInstance instance = getInstance(); Uri rewrited = instance.rewriteUri(Uri.parse(src), URIAdapter.IMAGE); if (Constants.Scheme.LOCAL.equals(rewrited.getScheme())) { setLocalSrc(rewrited); } else { setRemoteSrc(rewrited); } } @Deprecated  WXImage(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, String instanceId, boolean isLazy);  WXImage(WXSDKInstance instance, WXDomObject node,
                  WXVContainer parent); }
WXImage extends WXComponent<ImageView> { @WXComponentProp(name = Constants.Name.SRC) public void setSrc(String src) { if (src == null) { return; } WXSDKInstance instance = getInstance(); Uri rewrited = instance.rewriteUri(Uri.parse(src), URIAdapter.IMAGE); if (Constants.Scheme.LOCAL.equals(rewrited.getScheme())) { setLocalSrc(rewrited); } else { setRemoteSrc(rewrited); } } @Deprecated  WXImage(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, String instanceId, boolean isLazy);  WXImage(WXSDKInstance instance, WXDomObject node,
                  WXVContainer parent); @Override void refreshData(WXComponent component); @WXComponentProp(name = Constants.Name.RESIZE_MODE) void setResizeMode(String resizeMode); @WXComponentProp(name = Constants.Name.RESIZE) void setResize(String resize); @WXComponentProp(name = Constants.Name.SRC) void setSrc(String src); @Override void updateProperties(Map<String, Object> props); }
WXImage extends WXComponent<ImageView> { @WXComponentProp(name = Constants.Name.SRC) public void setSrc(String src) { if (src == null) { return; } WXSDKInstance instance = getInstance(); Uri rewrited = instance.rewriteUri(Uri.parse(src), URIAdapter.IMAGE); if (Constants.Scheme.LOCAL.equals(rewrited.getScheme())) { setLocalSrc(rewrited); } else { setRemoteSrc(rewrited); } } @Deprecated  WXImage(WXSDKInstance instance, WXDomObject dom, WXVContainer parent, String instanceId, boolean isLazy);  WXImage(WXSDKInstance instance, WXDomObject node,
                  WXVContainer parent); @Override void refreshData(WXComponent component); @WXComponentProp(name = Constants.Name.RESIZE_MODE) void setResizeMode(String resizeMode); @WXComponentProp(name = Constants.Name.RESIZE) void setResize(String resize); @WXComponentProp(name = Constants.Name.SRC) void setSrc(String src); @Override void updateProperties(Map<String, Object> props);  }