Sunday, January 10, 2016
WebView and ListView interactive use, asynchronous loading problems
I used a listView to load multiple WebView. Each WebView data are loaded in the background. Now there is a problem is, after all View all been created, listView not visible WebView, even if the data has been loaded successfully, its height is still 0.5 need to drag all the visible area to the rear will calculate the height is correct, then automatically redrawn.
This presents a problem, because the action is redrawn behind the drag gesture, but will be automatically extended after the item is redrawn, result is that maybe you just want to drag 10dip, but actually dragged 10dip + height of item The last operational effect is a mess. . .
Is there any way to make the invisible webview can get the height correct? Such gestures during listview will not have this phenomenon occurred very friendly.
This problem is very large head. . . Look up to the people to get help, Thank you very much
Reply:
After a webview load this webview will try to use invalidate refresh
Reply:
No, onMeasure calculation result is not right, if the non-visible area, then height calculation has been zero
Reply:
Forget that, webView set size is adaptive, it will generate this problem, if it is a fixed size, then there would not be this problem
Reply:
Seeking answers. . . .
Reply:
The landlord has not been resolved, ah, I also encountered the same problem
Reply:
The landlord resolve what, I have a similar problem, but a listview put imageview, also headache ah.
Reply:
This requires highly dynamic set list! Each item must dynamically acquired inside webView height! Get webView height should be to use js to get!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment