-
Notifications
You must be signed in to change notification settings - Fork 1.8k
+ [android] support prerender #343
+ [android] support prerender #343
Conversation
@sospartan pls review it:) |
@@ -122,7 +123,8 @@ | |||
/** | |||
* Render start time | |||
*/ | |||
private long mRenderStartTime; | |||
//this field may accessed outside | |||
public long mRenderStartTime; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no public field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i'll add setter method
},0); | ||
} | ||
|
||
public void replaceContext(@NonNull Context context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'setContext' is fair enough. Pls add more comments about why context is set-able
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@Override | ||
public void executeDom(DOMActionContext context) { | ||
super.executeDom(context); | ||
//add by chuyi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i want 'save cached instance' when layout finished. so i add LayoutFinishListener
, when createFinish action invoked, the listener will fired too.
import com.taobao.weex.dom.RenderAction; | ||
import com.taobao.weex.dom.RenderActionContext; | ||
|
||
class ExecutableAction implements DOMAction, RenderAction { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This action post a runnable job to render thread, the name should be more clear. Better add 'render' to the class name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to ExecutableRenderAction
@@ -57,28 +59,32 @@ void setHandler(Handler handler) { | |||
|
|||
@JSMethod(uiThread = false) | |||
public void setTimeout(@IntRange(from = 1) int funcId, @IntRange(from = 0) int delay) { | |||
postMessage(WXJSBridgeMsgType.MODULE_TIMEOUT, funcId, delay, Integer.parseInt(mWXSDKInstance.getInstanceId())); | |||
if(mWXSDKInstance != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is irrelevant to the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope... we want hold timers in preRenderMode
Generated by 🚫 danger |
introduction : https://issues.apache.org/jira/browse/WEEX-27?jql=project%20%3D%20WEEX%20AND%20resolution%20%3D%20Unresolved%20AND%20priority%20%3D%20Major%20ORDER%20BY%20key%20DESC