Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First, you should add <code>http://</code> at the beginning of you URI:</p> <pre><code>Uri uri = Uri.parse("http://www.dha.com.tr/newpics/news/230620111356175716857.jpg"); </code></pre> <hr> <p><code>ImageView</code> does not support loading images from remote locations. Only resources or files on local file system. In your case you should see warning in <code>LogCat</code>:</p> <pre><code>06-23 15:19:52.487: WARN/System.err(27097): java.io.FileNotFoundException: /http:/www.dha.com.tr/newpics/news/230620111356175716857.jpg (No such file or directory) 06-23 15:19:52.503: WARN/System.err(27097): at org.apache.harmony.luni.platform.OSFileSystem.openImpl(Native Method) 06-23 15:19:52.503: WARN/System.err(27097): at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:152) 06-23 15:19:52.503: WARN/System.err(27097): at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:82) 06-23 15:19:52.503: WARN/System.err(27097): at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:134) 06-23 15:19:52.503: WARN/System.err(27097): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:349) 06-23 15:19:52.503: WARN/System.err(27097): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:399) 06-23 15:19:52.503: WARN/System.err(27097): at android.graphics.drawable.Drawable.createFromPath(Drawable.java:801) 06-23 15:19:52.503: WARN/System.err(27097): at android.widget.ImageView.resolveUri(ImageView.java:516) 06-23 15:19:52.503: WARN/System.err(27097): at android.widget.ImageView.setImageURI(ImageView.java:293) ... 06-23 15:19:52.503: WARN/System.err(27097): at dalvik.system.NativeStart.main(Native Method) 06-23 15:19:52.503: INFO/System.out(27097): resolveUri failed on bad bitmap uri: http://www.dha.com.tr/newpics/news/230620111356175716857.jpg </code></pre> <hr> <p>You should download the image yourself and then specify local path for <code>setImageURI</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload