Java Code Examples for com.taobao.weex.WXSDKInstance#registerActivityStateListener()
The following examples show how to use
com.taobao.weex.WXSDKInstance#registerActivityStateListener() .
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: PlayDebugAdapter.java From analyzer-of-android-for-Apache-Weex with Apache License 2.0 | 6 votes |
@Override public View wrapContainer(WXSDKInstance instance, View wxView) { try { Class scalpelClas = Class.forName("com.taobao.weex.scalpel.ScalpelFrameLayout"); Constructor constructor = scalpelClas.getConstructor(new Class[]{Context.class}); ViewGroup container = (ViewGroup) constructor.newInstance(wxView.getContext()); if (container != null) { container.addView(wxView); Class cls = Class.forName("com.taobao.weex.WXDebugTool"); Method m = cls.getMethod("updateScapleView", new Class[]{Object.class}); m.invoke(null, new Object[]{container}); instance.registerActivityStateListener(new DebugActivityState(wxView)); return container; } } catch (Exception e) { } return wxView; }
Example 2
Source File: PlayDebugAdapter.java From weex with Apache License 2.0 | 6 votes |
@Override public View wrapContainer(WXSDKInstance instance, View wxView) { try { Class scalpelClas = Class.forName("com.taobao.weex.scalpel.ScalpelFrameLayout"); Constructor constructor = scalpelClas.getConstructor(new Class[]{Context.class}); ViewGroup container = (ViewGroup) constructor.newInstance(wxView.getContext()); if (container != null) { container.addView(wxView); Class cls = Class.forName("com.taobao.weex.WXDebugTool"); Method m = cls.getMethod("updateScapleView", new Class[]{Object.class}); m.invoke(null, new Object[]{container}); instance.registerActivityStateListener(new DebugActivityState(wxView)); return container; } } catch (Exception e) { } return wxView; }
Example 3
Source File: DefautDebugAdapter.java From weex with Apache License 2.0 | 5 votes |
@Override public View wrapContainer(WXSDKInstance instance, View wxView) { if (wxView != null && wxView.getContext() != null && wxView.getParent() == null && TextUtils.equals(getDebugOptions(SHOW_3D_LAYER),"true")) { ScalpelFrameLayout scalpelFrameLayout = new ScalpelFrameLayout(wxView.getContext()); WXDebugTool.updateScapleView(scalpelFrameLayout); scalpelFrameLayout.addView(wxView); instance.registerActivityStateListener(new DebugActivityState(wxView)); return scalpelFrameLayout; } return wxView; }