Home  >  Q&A  >  body text

android - 为什么安卓WebView无法打开页面中的链接

题主在学习用WebView制作一个简单的浏览器时发现 运行后WebView无法打开页面中的链接 例如进入百度首页后再点击其他链接无法跳转,这是为什么呢?还有WebView打开页面的速度很慢,不是网速原因。 怎么实现页面加载速度的提升?另外很好奇浏览器的省流量是怎么实现的?先压缩图片?
还有单纯用WebVIew好像会出现程序无响应 是要另开个线程加载吗?

PHP中文网PHP中文网2722 days ago335

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 13:17:36

    1. WebView has a setWebViewClient method. You need to add a WebViewClient to link to jump
    2. Are you competing with a computer?
    3. Traffic first passes through the relay server, which will do things such as compressing images, deleting ads, and rearranging/compressing formats
    4. ANR....How did you load the data?

    reply
    0
  • Cancelreply