Does ImageView.setImageURI(Uri uri) work with remote files?

前端 未结 2 1464
遇见更好的自我
遇见更好的自我 2021-01-17 16:00

Is it possible to load an image from a remote server using ImageView.setImageURI(Uri uri)?

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-17 16:34

    The short answer is no! It can't.

    You could use ImageView.setImageURI(Uri uri) for instance if the uri contains a reference to a local file. Eg: file:///sdcard/images/thumb.png

提交回复
热议问题