本文整理汇总了Java中com.taobao.weex.bridge.WXModuleManager类的典型用法代码示例。如果您正苦于以下问题:Java WXModuleManager类的具体用法?Java WXModuleManager怎么用?Java WXModuleManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WXModuleManager类属于com.taobao.weex.bridge包,在下文中一共展示了WXModuleManager类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onActivityCreate
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
/********************************
* begin hook Activity life cycle callback
********************************************************/
@Override
public void onActivityCreate() {
// module listen Activity onActivityCreate
WXModuleManager.onActivityCreate(getInstanceId());
if(mRootComp != null) {
mRootComp.onActivityCreate();
}else{
WXLogUtils.w("Warning :Component tree has not build completely,onActivityCreate can not be call!");
}
mGlobalEventReceiver=new WXGlobalEventReceiver(this);
getContext().registerReceiver(mGlobalEventReceiver,new IntentFilter(WXGlobalEventReceiver.EVENT_ACTION));
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:20,代码来源:WXSDKInstance.java
示例2: onActivityResume
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
@Override
public void onActivityResume() {
// notify onActivityResume callback to module
WXModuleManager.onActivityResume(getInstanceId());
if(mRootComp != null) {
mRootComp.onActivityResume();
}else{
WXLogUtils.w("Warning :Component tree has not build completely, onActivityResume can not be call!");
}
if (mCurrentGround) {
WXLogUtils.i("Application to be in the foreground");
Intent intent = new Intent(WXGlobalEventReceiver.EVENT_ACTION);
intent.putExtra(WXGlobalEventReceiver.EVENT_NAME, Constants.Event.RESUME_EVENT);
intent.putExtra(WXGlobalEventReceiver.EVENT_WX_INSTANCEID, getInstanceId());
mContext.sendBroadcast(intent);
mCurrentGround = false;
}
onViewAppear();
setViewPortWidth(mInstanceViewPortWidth);
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:26,代码来源:WXSDKInstance.java
示例3: onActivityResume
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
@Override
public void onActivityResume() {
// notify onActivityResume callback to module
WXModuleManager.onActivityResume(getInstanceId());
if(mRootComp != null) {
mRootComp.onActivityResume();
}else{
WXLogUtils.w("Warning :Component tree has not build completely, onActivityResume can not be call!");
}
Intent intent=new Intent(WXGlobalEventReceiver.EVENT_ACTION);
intent.putExtra(WXGlobalEventReceiver.EVENT_NAME,Constants.Event.RESUME_EVENT);
intent.putExtra(WXGlobalEventReceiver.EVENT_WX_INSTANCEID,getInstanceId());
mContext.sendBroadcast(intent);
onViewAppear();
}
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:20,代码来源:WXSDKInstance.java
示例4: destroyInstance
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
void destroyInstance(String instanceId) {
if (TextUtils.isEmpty(instanceId)) {
return;
}
if (!WXUtils.isUiThread()) {
throw new WXRuntimeException("[WXSDKManager] destroyInstance error");
}
mWXRenderManager.removeRenderStatement(instanceId);
mWXDomManager.removeDomStatement(instanceId);
mBridgeManager.destroyInstance(instanceId);
WXModuleManager.destroyInstanceModules(instanceId);
}
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:13,代码来源:WXSDKManager.java
示例5: reload
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
public static void reload(final Context context, boolean remoteDebug) {
WXEnvironment.sRemoteDebugMode = remoteDebug;
WXBridgeManager.getInstance().restart();
WXBridgeManager.getInstance().initScriptsFramework(null);
WXModuleManager.reload();
WXComponentRegistry.reload();
WXSDKManager.getInstance().postOnUiThread(new Runnable() {
@Override
public void run() {
LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(JS_FRAMEWORK_RELOAD));
}
}, 1000);
}
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:14,代码来源:WXSDKEngine.java
示例6: destroyInstance
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
void destroyInstance(String instanceId) {
setCrashInfo(WXEnvironment.WEEX_CURRENT_KEY,"");
if (TextUtils.isEmpty(instanceId)) {
return;
}
if (!WXUtils.isUiThread()) {
throw new WXRuntimeException("[WXSDKManager] destroyInstance error");
}
mWXRenderManager.removeRenderStatement(instanceId);
mWXDomManager.removeDomStatement(instanceId);
mBridgeManager.destroyInstance(instanceId);
WXModuleManager.destroyInstanceModules(instanceId);
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:14,代码来源:WXSDKManager.java
示例7: onActivityStart
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
@Override
public void onActivityStart() {
// module listen Activity onActivityCreate
WXModuleManager.onActivityStart(getInstanceId());
if(mRootComp != null) {
mRootComp.onActivityStart();
}else{
WXLogUtils.w("Warning :Component tree has not build completely,onActivityStart can not be call!");
}
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:13,代码来源:WXSDKInstance.java
示例8: onCreateOptionsMenu
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
public boolean onCreateOptionsMenu(Menu menu) {
WXModuleManager.onCreateOptionsMenu(getInstanceId(),menu);
if(mRootComp != null) {
mRootComp.onCreateOptionsMenu(menu);
}else{
WXLogUtils.w("Warning :Component tree has not build completely,onActivityStart can not be call!");
}
return true;
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:11,代码来源:WXSDKInstance.java
示例9: onActivityPause
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
@Override
public void onActivityPause() {
onViewDisappear();
if(!isCommit){
Set<String> componentTypes= WXComponentFactory.getComponentTypesByInstanceId(getInstanceId());
if(componentTypes!=null && componentTypes.contains(WXBasicComponentType.SCROLLER)){
mWXPerformance.useScroller=1;
}
mWXPerformance.maxDeepViewLayer=getMaxDeepLayer();
if (mUserTrackAdapter != null) {
mUserTrackAdapter.commit(mContext, null, IWXUserTrackAdapter.LOAD, mWXPerformance, getUserTrackParams());
}
isCommit=true;
}
// module listen Activity onActivityPause
WXModuleManager.onActivityPause(getInstanceId());
if(mRootComp != null) {
mRootComp.onActivityPause();
}else{
WXLogUtils.w("Warning :Component tree has not build completely,onActivityPause can not be call!");
}
WXLogUtils.i("Application onActivityPause()");
if (!mCurrentGround) {
WXLogUtils.i("Application to be in the backround");
Intent intent = new Intent(WXGlobalEventReceiver.EVENT_ACTION);
intent.putExtra(WXGlobalEventReceiver.EVENT_NAME, Constants.Event.PAUSE_EVENT);
intent.putExtra(WXGlobalEventReceiver.EVENT_WX_INSTANCEID, getInstanceId());
mContext.sendBroadcast(intent);
this.mCurrentGround = true;
}
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:33,代码来源:WXSDKInstance.java
示例10: onActivityStop
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
@Override
public void onActivityStop() {
// notify onActivityResume callback to module
WXModuleManager.onActivityStop(getInstanceId());
if(mRootComp != null) {
mRootComp.onActivityStop();
}else{
WXLogUtils.w("Warning :Component tree has not build completely, onActivityStop can not be call!");
}
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:15,代码来源:WXSDKInstance.java
示例11: onActivityDestroy
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
@Override
public void onActivityDestroy() {
WXModuleManager.onActivityDestroy(getInstanceId());
if(mRootComp != null) {
mRootComp.onActivityDestroy();
}else{
WXLogUtils.w("Warning :Component tree has not build completely, onActivityDestroy can not be call!");
}
destroy();
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:13,代码来源:WXSDKInstance.java
示例12: onActivityBack
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
@Override
public boolean onActivityBack() {
WXModuleManager.onActivityBack(getInstanceId());
if(mRootComp != null) {
return mRootComp.onActivityBack();
}else{
WXLogUtils.w("Warning :Component tree has not build completely, onActivityBack can not be call!");
}
return false;
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:14,代码来源:WXSDKInstance.java
示例13: onActivityResult
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
public void onActivityResult(int requestCode, int resultCode, Intent data){
WXModuleManager.onActivityResult(getInstanceId(),requestCode,resultCode,data);
if(mRootComp != null) {
mRootComp.onActivityResult(requestCode,resultCode,data);
}else{
WXLogUtils.w("Warning :Component tree has not build completely, onActivityResult can not be call!");
}
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:10,代码来源:WXSDKInstance.java
示例14: onRequestPermissionsResult
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
WXModuleManager.onRequestPermissionsResult(getInstanceId(),requestCode,permissions,grantResults);
if(mRootComp != null) {
mRootComp.onRequestPermissionsResult(requestCode,permissions,grantResults);
}else{
WXLogUtils.w("Warning :Component tree has not build completely, onRequestPermissionsResult can not be call!");
}
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:11,代码来源:WXSDKInstance.java
示例15: reload
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
public static void reload(final Context context,String framework, boolean remoteDebug) {
WXEnvironment.sRemoteDebugMode = remoteDebug;
WXBridgeManager.getInstance().restart();
WXBridgeManager.getInstance().initScriptsFramework(framework);
WXModuleManager.reload();
WXComponentRegistry.reload();
WXSDKManager.getInstance().postOnUiThread(new Runnable() {
@Override
public void run() {
LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(JS_FRAMEWORK_RELOAD));
}
}, 1000);
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:14,代码来源:WXSDKEngine.java
示例16: onActivityPause
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
@Override
public void onActivityPause() {
onViewDisappear();
if(!isCommit){
Set<String> componentTypes= WXComponentFactory.getComponentTypesByInstanceId(getInstanceId());
if(componentTypes!=null && componentTypes.contains(WXBasicComponentType.SCROLLER)){
mWXPerformance.useScroller=1;
}
mWXPerformance.maxDeepViewLayer=getMaxDeepLayer();
if (mUserTrackAdapter != null) {
mUserTrackAdapter.commit(mContext, null, IWXUserTrackAdapter.LOAD, mWXPerformance, getUserTrackParams());
}
isCommit=true;
}
// module listen Activity onActivityPause
WXModuleManager.onActivityPause(getInstanceId());
if(mRootComp != null) {
mRootComp.onActivityPause();
}else{
WXLogUtils.w("Warning :Component tree has not build completely,onActivityPause can not be call!");
}
Intent intent=new Intent(WXGlobalEventReceiver.EVENT_ACTION);
intent.putExtra(WXGlobalEventReceiver.EVENT_NAME,Constants.Event.PAUSE_EVENT);
intent.putExtra(WXGlobalEventReceiver.EVENT_WX_INSTANCEID,getInstanceId());
mContext.sendBroadcast(intent);
}
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:28,代码来源:WXSDKInstance.java
示例17: onActivityResult
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
public void onActivityResult(int requestCode, int resultCode, Intent data){
WXModuleManager.onActivityResult(getInstanceId(),requestCode,resultCode,data);
if(mRootComp != null) {
mRootComp.onActivityResult(requestCode,requestCode,data);
}else{
WXLogUtils.w("Warning :Component tree has not build completely, onActivityResult can not be call!");
}
}
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:10,代码来源:WXSDKInstance.java
示例18: reload
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
public static void reload(final Context context,String framework, boolean remoteDebug) {
WXEnvironment.sRemoteDebugMode = remoteDebug;
WXBridgeManager.getInstance().restart();
WXBridgeManager.getInstance().initScriptsFramework(framework);
WXModuleManager.reload();
WXComponentRegistry.reload();
WXSDKManager.getInstance().postOnUiThread(new Runnable() {
@Override
public void run() {
LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(JS_FRAMEWORK_RELOAD));
}
});
}
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:14,代码来源:WXSDKEngine.java
示例19: registerModule
import com.taobao.weex.bridge.WXModuleManager; //导入依赖的package包/类
private static <T extends WXModule> boolean registerModule(String moduleName, ModuleFactory factory, boolean global) throws WXException {
return WXModuleManager.registerModule(moduleName, factory,global);
}
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:4,代码来源:WXSDKEngine.java
注:本文中的com.taobao.weex.bridge.WXModuleManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论