Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
400 views
in Technique[技术] by (71.8m points)

请问weex如何获取android上webview内容的高度

因业务需要,在srcoller中显示web内容,所以需要将webview高度适应web内容高度。请问有什么办法可以实现?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

我们用的原生扩展component方式解决的。 IOS可以扩展webview自适应高度撑开容器, android通过追入weexSDK webview渲染方法拿到高度,然后通过fireEvent方法返回给weex页面更改外层高度设置达到效果。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...