Skip to content Skip to sidebar Skip to footer

Android How To Display And Image From Url

I'm having trouble displaying SOME images on my android app. Just normal display image from certain URL. Some images works, some just doesn't work. For instance try displaying this

Solution 1:

Or you can try this ImageDownloader class from google. It´s works nice :) Is an AsynkTask that handle the download and set the bitmap to an ImageView.

ImageDownloader

Usage:

privatefinalImageDownloadermDownload=newImageDownloader();
mDownload.download("URL", imageView);

Solution 2:

You will have no problems displayin that image in a webview

WebViewmyWebView= (WebView) findViewById(R.id.webview);                   
myWebView.loadUrl("http://img191.imageshack.us/img191/7379/tronlegacys7i7wsjf.jpg");

where are your image being displayed?

Solution 3:

Make sure you have <uses-permission android:name="android.permission.INTERNET" /> in your AndroidManifest.xml. What code are you using to load the image?

Post a Comment for "Android How To Display And Image From Url"