com.alibaba.weex.commons.adapter.ImageAdapter Java Examples
The following examples show how to use
com.alibaba.weex.commons.adapter.ImageAdapter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WXApplication.java From WeexOne with MIT License | 6 votes |
@Override public void onCreate() { super.onCreate(); // initDebugEnvironment(false, "DEBUG_SERVER_HOST"); WXSDKEngine.addCustomOptions("appName", "WXSample"); WXSDKEngine.addCustomOptions("appGroup", "WXApp"); WXSDKEngine.initialize(this, new InitConfig.Builder() .setImgAdapter(new ImageAdapter()) .build() ); Fresco.initialize(this); AppConfig.init(this); ExtensionManager.registerComponents(AppConfig.getComponents()); ExtensionManager.registerModules(AppConfig.getModules()); }
Example #2
Source File: WXApplication.java From weex with Apache License 2.0 | 6 votes |
@Override public void onCreate() { super.onCreate(); initDebugEnvironment(false, "DEBUG_SERVER_HOST"); WXSDKEngine.addCustomOptions("appName", "WXSample"); WXSDKEngine.addCustomOptions("appGroup", "WXApp"); WXSDKEngine.initialize(this, new InitConfig.Builder() .setImgAdapter(new ImageAdapter()) .setDebugAdapter(new PlayDebugAdapter()) .build() ); try { Fresco.initialize(this); WXSDKEngine.registerComponent("richtext", RichText.class); WXSDKEngine.registerModule("render", RenderModule.class); WXSDKEngine.registerModule("event", WXEventModule.class); WXSDKEngine.registerModule("myModule", MyModule.class); } catch (WXException e) { e.printStackTrace(); } }
Example #3
Source File: WXApplication.java From analyzer-of-android-for-Apache-Weex with Apache License 2.0 | 4 votes |
@Override public void onCreate() { super.onCreate(); /** * Set up for fresco usage. * Set<RequestListener> requestListeners = new HashSet<>(); * requestListeners.add(new RequestLoggingListener()); * ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this) * .setRequestListeners(requestListeners) * .build(); * Fresco.initialize(this,config); **/ // initDebugEnvironment(false, "DEBUG_SERVER_HOST"); WXSDKEngine.addCustomOptions("appName", "WXSample"); WXSDKEngine.addCustomOptions("appGroup", "WXApp"); WXSDKEngine.initialize(this, new InitConfig.Builder() //.setImgAdapter(new FrescoImageAdapter())// use fresco adapter .setImgAdapter(new ImageAdapter()) .setDebugAdapter(new PlayDebugAdapter()) .build() ); try { Fresco.initialize(this); WXSDKEngine.registerComponent("richtext", RichText.class); WXSDKEngine.registerModule("render", RenderModule.class); WXSDKEngine.registerModule("event", WXEventModule.class); WXSDKEngine.registerModule("myModule", MyModule.class); WXSDKEngine.registerModule("geolocation", GeolocationModule.class); /** * override default image tag * WXSDKEngine.registerComponent("image", FrescoImageComponent.class); */ } catch (WXException e) { e.printStackTrace(); } }