开发者

How to Stop the Flood of onNewPicture()s?

开发者 https://www.devze.com 2023-04-13 09:42 出处:网络
In my tiny application, I get what I need from a web page after the first onNewPicture(). But WebView\'s PictureListener keeps bombarding my application with onNewPicture() callbacks... This is despi

In my tiny application, I get what I need from a web page after the first onNewPicture().

But WebView's PictureListener keeps bombarding my application with onNewPicture() callbacks... This is despite WebSettings.setBlockNetworkImage() set to true.

Is there a way 开发者_如何学Cto tell WebView to stop listening/sending/processing onNewPicture()s?


Is there a way to tell WebView to stop listening/sending/processing onNewPicture()s?

Off the cuff, I would call setPictureListener(null) on the WebView, once you no longer need to be notified.

Note that PictureListener is marked as deprecated, though off the top of my head I have no idea what is replacing it.

0

精彩评论

暂无评论...
验证码 换一张
取 消