public class MainActivity extends Activity {
ImageView i;
String imageUrl = "http://64.250.238.26:1111/clips/sunsetsofmauisplash.jpg";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
try {
i = (ImageView) findViewById(R.id.image);
Bitmap bitmap = BitmapFactory.decodeStream((InputStream) new URL(imageUrl).getContent());
i.setImageBitmap(bitmap);
} catch (MalformedURLException e) {
} catch (IOException e) {
}
}
}
Hello all, i am using this code to display image from URL, my code is run and it does not gives error but image is not display.. any help?? Thanks..