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端native代码能监控到js页面渲染完成吗 #1

Open
qiandongw opened this issue Mar 6, 2018 · 2 comments
Open

android端native代码能监控到js页面渲染完成吗 #1

qiandongw opened this issue Mar 6, 2018 · 2 comments

Comments

@qiandongw
Copy link

看了渲染机制,有个问题想请教一下,native端能监控到js页面渲染完成吗?ReactRootView中onAttachedToReactInstance只是rootView和ReactContext之间绑定了关系,这时候RN页面不一定渲染完成了吧。谢谢

@sucese
Copy link
Owner

sucese commented Mar 6, 2018

RN的渲染分为两部分:1. JS的解析与渲染。2. 将JS Widget转换为Android Native WIdget。第二步完成
以后js页面才算真正的展示到用户面前,可以用ViewTreeObserver.OnDrawListener监控。

@qiandongw
Copy link
Author

ViewTreeObserver.OnDrawListener 这个方法的回调 native试图还没有画完吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants