本文整理汇总了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);
}
}
示例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);
}
示例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();
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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();
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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());
}
示例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);
}
示例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();
}
}
示例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());
}
}