本文整理汇总了Java中com.taobao.weex.WXSDKInstance.commitUTStab方法的典型用法代码示例。如果您正苦于以下问题:Java WXSDKInstance.commitUTStab方法的具体用法?Java WXSDKInstance.commitUTStab怎么用?Java WXSDKInstance.commitUTStab使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.taobao.weex.WXSDKInstance
的用法示例。
在下文中一共展示了WXSDKInstance.commitUTStab方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: scrollToDom
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* Create a command object for scroll the given view to the specified position.
* @param ref Reference of the dom.
* @param options the specified position
*/
void scrollToDom(final String ref, final JSONObject options) {
if (mDestroy) {
return;
}
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
mWXRenderManager.scrollToComponent(mInstanceId, ref, options);
}
@Override
public String toString() {
return "scrollToPosition";
}
});
mDirty = true;
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例2: updateFinish
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* Create a command object for notifying {@link WXRenderManager} that the process of update
* given view is finished, and put the command object in the queue.
*/
void updateFinish() {
if (mDestroy) {
return;
}
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
mWXRenderManager.updateFinish(mInstanceId);
}
@Override
public String toString() {
return "updateFinish";
}
});
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例3: updateFinish
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* Create a command object for notifying {@link WXRenderManager} that the process of update
* given view is finished, and put the command object in the queue.
*/
void updateFinish() {
if (mDestroy) {
return;
}
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
mWXRenderManager.updateFinish(mInstanceId);
}
@Override
public String toString() {
return "updateFinish";
}
});
mDirty = true;
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例4: executeDom
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
@Override
public void executeDom(DOMActionContext context) {
if (context.isDestory()) {
return;
}
WXSDKInstance instance = context.getInstance();
WXDomObject domObject = context.getDomByRef(mRef);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_ADDEVENT);
}
return;
}
domObject.addEvent(mEvent);
mUpdatedDom = domObject;
context.postRenderTask(this);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例5: executeDom
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
@Override
public void executeDom(DOMActionContext context) {
if (context.isDestory()) {
return;
}
WXSDKInstance instance = context.getInstance();
WXDomObject domObject = context.getDomByRef(mRef);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_REMOVEEVENT);
}
return;
}
domObject.removeEvent(mEvent);
mUpdatedDomObject = domObject;
context.postRenderTask(this);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例6: commitJSBridgeAlarmMonitor
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
public void commitJSBridgeAlarmMonitor(String instanceId, WXErrorCode errCode) {
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if (instance == null) {
return;
}
errCode.appendErrMsg(" url:"+instance.getBundleUrl());
instance.commitUTStab(IWXUserTrackAdapter.JS_BRIDGE, errCode);
}
示例7: updateAttrs
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* Update the attributes according to the given attribute. Then creating a
* command object for updating corresponding view and put the command object in the queue.
* @param ref Reference of the dom.
* @param attrs the new style. This style is only a part of the full attribute set, and will be
* merged into attributes
* @see #updateStyle(String, JSONObject)
*/
void updateAttrs(String ref, final JSONObject attrs) {
if (mDestroy) {
return;
}
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
final WXDomObject domObject = mRegistry.get(ref);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_UPDATEATTRS);
}
return;
}
domObject.updateAttr(attrs);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
mWXRenderManager.updateAttrs(mInstanceId, domObject.getRef(), attrs);
}
@Override
public String toString() {
return "updateAttr";
}
});
mDirty = true;
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例8: addEvent
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* Create a command object for adding a default event listener to the corresponding {@link
* WXDomObject} and put the command object in the queue.
* When the event is triggered, the eventListener will call {@link WXSDKManager#fireEvent(String, String, String)}
* , and the JS will handle all the operations from there.
*
* @param ref Reference of the dom.
* @param type the type of the event, this may be a plain event defined in
* {@link com.taobao.weex.common.Constants.Event} or a gesture defined in {@link com.taobao
* .weex.ui.view.gesture.WXGestureType}
*/
void addEvent(final String ref, final String type) {
if (mDestroy) {
return;
}
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
WXDomObject domObject = mRegistry.get(ref);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_ADDEVENT);
}
return;
}
domObject.addEvent(type);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
mWXRenderManager.addEvent(mInstanceId, ref, type);
}
@Override
public String toString() {
return "Add event";
}
});
mDirty = true;
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例9: removeEvent
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* Create a command object for removing the event listener of the corresponding {@link
* WXDomObject} and put the command event in the queue.
* @param ref Reference of the dom.
* @param type the type of the event, this may be a plain event defined in
* {@link com.taobao.weex.common.Constants.Event} or a gesture defined in {@link com.taobao
* .weex.ui.view.gesture.WXGestureType}
*/
void removeEvent(final String ref, final String type) {
if (mDestroy) {
return;
}
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
WXDomObject domObject = mRegistry.get(ref);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_REMOVEEVENT);
}
return;
}
domObject.removeEvent(type);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
mWXRenderManager.removeEvent(mInstanceId, ref, type);
}
@Override
public String toString() {
return "removeEvent";
}
});
mDirty = true;
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例10: createFinish
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* Create a command object for notifying {@link WXRenderManager} that the process of creating
* given view is finished, and put the command object in the queue.
*/
void createFinish() {
if (mDestroy) {
return;
}
final WXDomObject root = mRegistry.get(WXDomObject.ROOT);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
mWXRenderManager.createFinish(mInstanceId,
(int) root.getLayoutWidth(),
(int) root.getLayoutHeight());
}
@Override
public String toString() {
return "createFinish";
}
});
mDirty = true;
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例11: refreshFinish
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* Create a command object for notifying {@link WXRenderManager} that the process of refreshing
* given view is finished, and put the command object in the queue.
*/
void refreshFinish() {
if (mDestroy) {
return;
}
final WXDomObject root = mRegistry.get(WXDomObject.ROOT);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
int realWidth = (int) root.getLayoutWidth();
int realHeight = (int) root.getLayoutHeight();
mWXRenderManager.refreshFinish(mInstanceId, realWidth, realHeight);
}
@Override
public String toString() {
return "refreshFinish";
}
});
mDirty = true;
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例12: removeEvent
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* Create a command object for removing the event listener of the corresponding {@link
* WXDomObject} and put the command event in the queue.
* @param ref Reference of the dom.
* @param type the type of the event, this may be a plain event defined in
* {@link com.taobao.weex.common.Constants.Event} or a gesture defined in {@link com.taobao
* .weex.ui.view.gesture.WXGestureType}
*/
void removeEvent(final String ref, final String type) {
if (mDestroy) {
return;
}
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
final WXDomObject domObject = mRegistry.get(ref);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_REMOVEEVENT);
}
return;
}
domObject.removeEvent(type);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
WXComponent comp = mWXRenderManager.getWXComponent(mInstanceId,ref);
if(comp != null){
//sync dom change to component
comp.updateDom(domObject);
mWXRenderManager.removeEvent(mInstanceId, ref, type);
}
}
@Override
public String toString() {
return "removeEvent";
}
});
mDirty = true;
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例13: executeDom
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
@Override
public void executeDom(DOMActionContext context) {
if (context.isDestory()) {
return;
}
context.postRenderTask(this);
WXSDKInstance instance = context.getInstance();
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例14: removeDom
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* Create a command object for removing the specified {@link WXDomObject}.
* If the domObject is null or its parent is null, this method returns directly.
* Otherwise, put the command object in the queue.
* @param ref Reference of the dom.
*/
void removeDom(final String ref) {
if (mDestroy) {
return;
}
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
WXDomObject domObject = mRegistry.get(ref);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_REMOVEELEMENT);
}
return;
}
WXDomObject parent = domObject.parent;
if (parent == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_REMOVEELEMENT);
}
return;
}
clearRegistryForDom(domObject);
parent.remove(domObject);
mRegistry.remove(ref);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
mWXRenderManager.removeComponent(mInstanceId, ref);
}
@Override
public String toString() {
return "removeDom";
}
});
mDirty = true;
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例15: addDomInternal
import com.taobao.weex.WXSDKInstance; //导入方法依赖的package包/类
/**
* Add DOM node.
*/
protected void addDomInternal(DOMActionContext context, JSONObject dom) {
if (context.isDestory()) {
return;
}
WXSDKInstance instance = context.getInstance();
if (instance == null) {
return;
}
WXErrorCode errCode = getErrorCode();
if (dom == null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, errCode);
}
//only non-root has parent.
WXDomObject domObject = WXDomObject.parse(dom, instance);
if (domObject == null || context.getDomByRef(domObject.getRef()) != null) {
if (WXEnvironment.isApkDebugable()) {
WXLogUtils.e("[DOMActionContextImpl] " + getStatementName() + " error,DOM object is null or already registered!!");
}
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, errCode);
return;
}
appendDomToTree(context, domObject);
domObject.traverseTree(
context.getAddDOMConsumer(),
context.getApplyStyleConsumer()
);
//Create component in dom thread
WXComponent component = createComponent(context, domObject);
if (component == null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, errCode);
//stop redner, some fatal happened.
return;
}
context.addDomInfo(domObject.getRef(), component);
context.postRenderTask(this);
addAnimationForDomTree(context, domObject);
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}