On one hand, WebViewClient.onPageFinished()
is a great way to tell when a web page finished loading (as in HttpGet) but it will not tell me when the web page has finished rendering.
On the other hand, there is PictureListener.onNewPicture()
which notifies me whenever the page has been (re)rendered.
This is great for most cases, but for pages which are heavily Javascript-rendered (like YouTube, for example), I need to be able to know when the last such render (for that page) occurred.
Something like PictureListener.onNewPictureFinished()
.
Such function doesn't exist, of course, in PictureListener, so I am now wondering whether it is possible to come up with similar functionality or workaround?
Any ideas how to determine last PictureListener.onNewPicture()
call?
(one idea that I have is to set a timer that will decide that "if within X seconds no onNewPicture() has been called, then the previous one must have been the last". This is an extremely inaccurate & fuzzy approach, which is guaranteed to fail in many scenarios).