开发者

android :images not being displayed

开发者 https://www.devze.com 2023-04-13 08:50 出处:网络
I am making an android app in which i need to display the remote images in my app my using fol开发者_JAVA百科lowing code.

I am making an android app in which i need to display the remote images in my app my using fol开发者_JAVA百科lowing code. but the images are not being displayed:

for(int i=0;i<stringOnTextView.length;i++){
    imageUrl = "http://ondamove.it/English/images/users/";
    imageUrl = imageUrl+stringOnTextView[i];
    System.out.println(imageUrl);

    URL myFileUrl = new URL(imageUrl);

    HttpURLConnection conn= (HttpURLConnection)myFileUrl.openConnection();
    conn.setDoInput(true);
    conn.connect();
    InputStream is = conn.getInputStream();
    bmImg = BitmapFactory.decodeStream(is);
    image.setImageBitmap(bmImg);
    System.out.println(bmImg.toString());
}

Can anyone tell me where is the problem. thanks


as a completion of my comment , see this three tutorials and you will find out what you should do :) :

tuto1
tuto2
tuto3

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号