Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+ [android] support prerender #343

Merged
merged 3 commits into from May 15, 2017

Conversation

@Rowandjj

This comment has been minimized.

Copy link
Contributor Author

commented May 15, 2017

@sospartan pls review it:)

@@ -122,7 +123,8 @@
/**
* Render start time
*/
private long mRenderStartTime;
//this field may accessed outside
public long mRenderStartTime;

This comment has been minimized.

Copy link
@sospartan

sospartan May 15, 2017

Contributor

no public field.

This comment has been minimized.

Copy link
@Rowandjj

Rowandjj May 15, 2017

Author Contributor

ok i'll add setter method

},0);
}

public void replaceContext(@NonNull Context context) {

This comment has been minimized.

Copy link
@sospartan

sospartan May 15, 2017

Contributor

'setContext' is fair enough. Pls add more comments about why context is set-able

This comment has been minimized.

Copy link
@Rowandjj

Rowandjj May 15, 2017

Author Contributor

ok

@Override
public void executeDom(DOMActionContext context) {
super.executeDom(context);
//add by chuyi

This comment has been minimized.

Copy link
@sospartan

This comment has been minimized.

Copy link
@Rowandjj

Rowandjj May 15, 2017

Author Contributor

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 {

This comment has been minimized.

Copy link
@sospartan

sospartan May 15, 2017

Contributor

This action post a runnable job to render thread, the name should be more clear. Better add 'render' to the class name.

This comment has been minimized.

Copy link
@Rowandjj

Rowandjj May 15, 2017

Author Contributor

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) {

This comment has been minimized.

Copy link
@sospartan

sospartan May 15, 2017

Contributor

This file is irrelevant to the PR.

This comment has been minimized.

Copy link
@Rowandjj

Rowandjj May 15, 2017

Author Contributor

nope... we want hold timers in preRenderMode

Rowandjj added 2 commits May 15, 2017
@weex-bot

This comment has been minimized.

Copy link

commented May 15, 2017

1 Message
📖 Executed 53 tests, with 0 failures (0 unexpected) in 41.687 (41.759) seconds

Generated by 🚫 danger

@asfgit asfgit merged commit 0cb3d98 into apache:0.13-dev May 15, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.