問題描述
WebView LoadURL dan GetView (WebView LoadURL and GetView)
I am use ListView and each cell is WebView. So, I see that I must place WebView.loadURL directly in GetView! And it is calling every time when I scrolling! So how can I cache WebView to call LoadURL only one time? Or may be I would be save Inflated view in array and return in GetView only view from array?
‑‑‑‑‑
參考解法
方法 1:
I think it is easier for you (sorry if I am wrong) to make add layouts (example LinearLayout) and add it in a ScrollView instead. It is a bit of a walkaround, but if you are not using too many WebViews I think this would be much easier. Call it to load all URLs at onCreate and it will not load the page when you scroll.
This answear is an alternative, and I have read your question.