Hello Ravi,
I've solved this problem through an Input Stream I give you my code :
first how to put this stream in my imageView, mThumbnail:
mThumbnail.setImageDrawable(imageOperations(url, "name.jpg"));
now my imageOperations method :
public static Drawable imageOperations(String url, String
saveFilename) {
try {
InputStream is = (InputStream) fetch(url);
Drawable d = Drawable.createFromStream(is, "src");
return d;
} catch (MalformedURLException e) {
e.printStackTrace();
return null;
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
and the fetch method :
private static Object fetch(String address) throws
MalformedURLException,IOException {
URL url = new URL(address);
Object content = url.getContent();
return content;
}
It might not be the best way but it works. I found it on a blog...
don't remember which one.
Nice day.
Fräntz
On 23 juin, 09:32, Ravi Savaliya <[EMAIL PROTECTED]> wrote:
> I am try to display image from internet. I have url of image , that i
> passed in constructing URI ref.
>
> screen display blank
>
> here is code,
>
> -----------------------------------------------------------------------------------------------------------------------------------
> ImageView imageView = (ImageView) findViewById(R.id.imageView);
>
> Uri uri=Uri.parse("http://static.px.yelp.com/upthumb/
> q0POOE3vv2LzNg1qN8MMyw/ms");
> imageView.setImageURI(uri);
> setContentView(imageView);
> -----------------------------------------------------------------------------------------------------------------------------------
>
> any reply is appreciable
>
> thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---