try{
URL aURL = new URL("some_valid_url.jpg");
InputStream is = (InputStream)aURL.getContent();
Drawable image = Drawable.createFromStream(is, "src");
myButton.setImageDrawable(image);
is.close();
}
...
All images tested so far work on the simulator and my htc g1 phone, but some won't work on my htc hero phone and no exceptions are thrown. I also tried bufferedinputstream with the same results. Some images work on my htc and some don't. could this be a jpg formatting issue or could I be missing something?
URL aURL = new URL("some_valid_url.jpg");
InputStream is = (InputStream)aURL.getContent();
Drawable image = Drawable.createFromStream(is, "src");
myButton.setImageDrawable(image);
is.close();
}
...
All images tested so far work on the simulator and my htc g1 phone, but some won't work on my htc hero phone and no exceptions are thrown. I also tried bufferedinputstream with the same results. Some images work on my htc and some don't. could this be a jpg formatting issue or could I be missing something?