当前位置: 首页>>代码示例>>Java>>正文


Java WXSDKEngine类代码示例

本文整理汇总了Java中com.taobao.weex.WXSDKEngine的典型用法代码示例。如果您正苦于以下问题:Java WXSDKEngine类的具体用法?Java WXSDKEngine怎么用?Java WXSDKEngine使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


WXSDKEngine类属于com.taobao.weex包,在下文中一共展示了WXSDKEngine类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setNavBarLeftItem

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@JSMethod(uiThread = true)
public void setNavBarLeftItem(String param, JSCallback callback) {
    if (!TextUtils.isEmpty(param)) {
        if (WXSDKEngine.getActivityNavBarSetter() != null) {
            if (WXSDKEngine.getActivityNavBarSetter().setNavBarLeftItem(param)) {
                if (callback != null) {
                    callback.invoke(MSG_SUCCESS);
                }
                return;
            }
        }
    }

    if (callback != null) {
        callback.invoke(MSG_FAILED);
    }

}
 
开发者ID:natjs,项目名称:nat-explorer,代码行数:19,代码来源:NavigatorModule.java

示例2: onCreate

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@Override
  public void onCreate() {
    super.onCreate();
//    initDebugEnvironment(true, false, "DEBUG_SERVER_HOST");
    WXSDKEngine.addCustomOptions("appName", "WXSample");
    WXSDKEngine.addCustomOptions("appGroup", "WXApp");
    WXSDKEngine.initialize(this,
        new InitConfig.Builder()
            .setImgAdapter(new ImageAdapter())
            .build()
    );

    try {
      WXSDKEngine.registerModule("event", WXEventModule.class);
    } catch (WXException e) {
      e.printStackTrace();
    }
    Fresco.initialize(this);
    AppConfig.init(this);
    PluginManager.init(this);
  }
 
开发者ID:wangwei123,项目名称:my-weex,代码行数:22,代码来源:WXApplication.java

示例3: pop

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@JSMethod(uiThread = true)
public void pop(String param, JSCallback callback) {

    if (WXSDKEngine.getActivityNavBarSetter() != null) {
        if (WXSDKEngine.getActivityNavBarSetter().pop(param)) {
            if (callback != null) {
                callback.invoke(MSG_SUCCESS);
            }
            return;
        }
    }

    if (mWXSDKInstance.getContext() instanceof Activity) {
        if (callback != null) {
            callback.invoke(MSG_SUCCESS);
        }
        ((Activity) mWXSDKInstance.getContext()).finish();
    }
}
 
开发者ID:natjs,项目名称:nat-explorer,代码行数:20,代码来源:NavigatorModule.java

示例4: setNavBarRightItem

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@JSMethod(uiThread = true)
public void setNavBarRightItem(String param, JSCallback callback) {
    if (!TextUtils.isEmpty(param)) {
        if (WXSDKEngine.getActivityNavBarSetter() != null) {
            if (WXSDKEngine.getActivityNavBarSetter().setNavBarRightItem(param)) {
                if (callback != null) {
                    callback.invoke(MSG_SUCCESS);
                }
                return;
            }
        }
    }

    if (callback != null) {
        callback.invoke(MSG_FAILED);
    }
}
 
开发者ID:natjs,项目名称:nat-explorer,代码行数:18,代码来源:NavigatorModule.java

示例5: setNavBarMoreItem

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@JSMethod(uiThread = true)
public void setNavBarMoreItem(String param, JSCallback callback) {
    if (!TextUtils.isEmpty(param)) {
        if (WXSDKEngine.getActivityNavBarSetter() != null) {
            if (WXSDKEngine.getActivityNavBarSetter().setNavBarMoreItem(param)) {
                if (callback != null) {
                    callback.invoke(MSG_SUCCESS);
                }
                return;
            }
        }
    }

    if (callback != null) {
        callback.invoke(MSG_FAILED);
    }
}
 
开发者ID:natjs,项目名称:nat-explorer,代码行数:18,代码来源:NavigatorModule.java

示例6: setNavBarTitle

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@JSMethod(uiThread = true)
public void setNavBarTitle(String param, JSCallback callback) {
    if (!TextUtils.isEmpty(param)) {
        if (WXSDKEngine.getActivityNavBarSetter() != null) {
            if (WXSDKEngine.getActivityNavBarSetter().setNavBarTitle(param)) {
                if (callback != null) {
                    callback.invoke(MSG_SUCCESS);
                }
                return;
            }
        }
    }
    if (callback != null) {
        callback.invoke(MSG_FAILED);
    }
}
 
开发者ID:natjs,项目名称:nat-explorer,代码行数:17,代码来源:NavigatorModule.java

示例7: pop

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@WXModuleAnno
public void pop(String param, final String callbackId) {

    if (WXSDKEngine.getActivityNavBarSetter() != null) {
        if (WXSDKEngine.getActivityNavBarSetter().pop(param)) {
            WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), callbackId,
                    MSG_SUCCESS);
            return;
        }
    }

    if (mWXSDKInstance.getContext() instanceof Activity) {
        WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), callbackId,
                                               MSG_SUCCESS);
        ((Activity) mWXSDKInstance.getContext()).finish();
    }
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:18,代码来源:WXNavigatorModule.java

示例8: setNavBarLeftItem

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@WXModuleAnno
public void setNavBarLeftItem(String param, final String callbackId) {
    if (!TextUtils.isEmpty(param)) {
        if (WXSDKEngine.getActivityNavBarSetter() != null) {
            if (WXSDKEngine.getActivityNavBarSetter().setNavBarLeftItem(param)) {
                WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), callbackId,
                        MSG_SUCCESS);
                return;
            }
        }
    }

    WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), callbackId,
            MSG_FAILED);

}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:17,代码来源:WXNavigatorModule.java

示例9: setUp

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
public void setUp() throws Exception {

        if (testApplication == null){
            createApplication(); // 创建 application
            testApplication = getApplication();

            WXSDKEngine.init(testApplication, null);
//            WXSDKEngine.registerComponent("latestVisitView", WXLatestVisitView.class);
//            WXSDKEngine.registerComponent("marquee", WXMarquee.class);
//            WXSDKEngine.registerComponent("countdown", WXCountDown.class);
//            WXSDKEngine.registerComponent("tabheader", WXTabHeader.class);
        }

//        assertNotNull(testApplication);

    }
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:17,代码来源:WeappJsBaseTestCase.java

示例10: init

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
public static void init(Application context) {
        UWXSDKManager.initialize(context);
//        WXSDKEngine.addCustomOptions("scheme", "portal");
//        WXSDKEngine.addCustomOptions(WXConfig.appGroup, "portal");
//        WXSDKEngine.addCustomOptions(WXConfig.appName, "portal");
        WXSDKEngine.initialize(context,
                new InitConfig.Builder()
                        .setImgAdapter(new FrescoImageAdapter())
                        .setJSExceptionAdapter(new JSExceptionAdapter())
                        .setDebugAdapter(new DebugAdapter())
                        .build()
        );
        try {
            WXSDKEngine.registerModule("UNavigator", UWXNavigatorModule.class);
            WXSDKEngine.registerModule("UScheme", UWXSchemeModule.class);
            WXSDKEngine.registerModule("UGlobalEvent", UWXGlobalEventModule.class);
            WXSDKEngine.registerModule("navigator", UWXNavigatorModule2.class);
        } catch (WXException e) {
            e.printStackTrace();
        }
        Fresco.initialize(context);
    }
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:23,代码来源:UWXInit.java

示例11: onCreate

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@Override
public void onCreate() {
  super.onCreate();
  WXSDKEngine.addCustomOptions("appName", "WXSample");
  WXSDKEngine.addCustomOptions("appGroup", "WXApp");
  WXSDKEngine.initialize(this,
      new InitConfig.Builder().setImgAdapter(new ImageAdapter()).build()
  );
  try {
    WXSDKEngine.registerModule("event", WXEventModule.class);
  } catch (WXException e) {
    e.printStackTrace();
  }
  AppConfig.init(this);
  WeexPluginContainer.loadAll(this);
}
 
开发者ID:weexteam,项目名称:weexpack-android,代码行数:17,代码来源:WXApplication.java

示例12: onCreate

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@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());

  }
 
开发者ID:dodola,项目名称:WeexOne,代码行数:19,代码来源:WXApplication.java

示例13: setNavBarLeftItem

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@WXModuleAnno
public void setNavBarLeftItem(String param, final String callbackId) {
    if (!TextUtils.isEmpty(param)) {
        if (WXSDKEngine.getActivityNavBarSetter() != null) {
            if (WXSDKEngine.getActivityNavBarSetter().setNavBarLeftItem(param)) {
                WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), callbackId,
                        WXConst.MSG_SUCCESS);
                return;
            }
        }
    }

    WXBridgeManager.getInstance().callback(mWXSDKInstance.getInstanceId(), callbackId,
            WXConst.MSG_FAILED);

}
 
开发者ID:Laisly,项目名称:weex,代码行数:17,代码来源:WXNavigatorModule.java

示例14: onCreate

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@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();
  }

}
 
开发者ID:Laisly,项目名称:weex,代码行数:27,代码来源:WXApplication.java

示例15: onCreate

import com.taobao.weex.WXSDKEngine; //导入依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();

    WXEnvironment.addCustomOptions("appName", "WeexDemo");
    InitConfig config = new InitConfig.Builder()
            .setImgAdapter(new ImageAdaptor())
            .build();
    WXSDKEngine.initialize(this, config);

    try {
        WXSDKEngine.registerModule("myModule", MyModule.class);
    } catch (WXException e) {
        WXLogUtils.e(e.getMessage());
    }
}
 
开发者ID:o2team,项目名称:weex-demo,代码行数:17,代码来源:WXApplication.java


注:本文中的com.taobao.weex.WXSDKEngine类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。