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

PageView addView问题 #1

Open
KotlinLan opened this issue Mar 12, 2020 · 2 comments
Open

PageView addView问题 #1

KotlinLan opened this issue Mar 12, 2020 · 2 comments

Comments

@KotlinLan
Copy link

你好,PageView继承LinearLayout 假如我想在PageView中add一个webview 有时候会渲染不出来,应该是网页还么有渲染成功,但是PageView已经绘制完毕了导致webview不显示,请问有方式解决这个问题吗

@newbiechen1024
Copy link
Owner

想吐槽下,为啥会有加 WebView 的需求..,PageView 应该只开放了 setHeaderView() 和 setFooterView()。计算添加进去后我推测和 PageView 绘制完成关系不大吧,PageView 绘制完成后,只有 TextPageView 会做图片缓存,如果加入到的是 PageView 的 child 节点,每次刷新应该都会走 dispatchDraw() 进行渲染 child 操作。走的是正常的 ViewGroup 的绘制流程。没有更多信息的情况下,暂时想到的是这些

@KotlinLan
Copy link
Author

image
加webview的需求只是一个举例。现在想实现的效果就是这种,可以在pagevie中加入其他view,这个view很特殊,有gif的图片,有可以自动播放的视频。具体可以研究一下番茄免费小说,目前想实现的就是类似番茄的效果,不知道目前的pageview能否实现?

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