Home  >  Q&A  >  body text

imageview图片基本处理 - Android用Jsoup写了个爬虫,但是模拟登陆需要验证码

我想做一个点击刷新验证码的功能。
目前的逻辑是 fragment->oncreateview的时候,请求一次然后imageview.setImageBitmap
但是在做点击刷新的时候,请求到了,setImageBitmap这句话却没有用了。
请问怎么解决

PHP中文网PHP中文网2741 days ago396

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2017-04-17 17:51:27

    If you crawl to the data, you can use a framework such as picasso to display network images, which is more convenient. There may be some problems if you use imageview directly.

    reply
    0
  • 阿神

    阿神2017-04-17 17:51:27

    imageview.setImageBitmap does not support network images. .
    You can use various useful image loaders such as Glide/Picasso/Fresco. .

    reply
    0
  • Cancelreply