String imgUrl = http://xxxxxxxxx......jpg; //定義圖片的網絡位置
URL url = new URL(imgUrl); //建立指向圖片的URL
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.connect(); ////打開指向圖片的連接
InputStream stream = connection.getInputStream();
BitMap bitmap = BitMapFactory.decodeStream(stream); //得到圖片對象
stream.close() //關閉流
得到圖片對象後可以顯示在ImageView控件中