Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Maybe try to use: (it should work)</p> <pre><code> Bitmap temp = null; try { if (temp_url.length() &gt; 5) { temp = BitmapFactory.decodeStream((InputStream)new URL(temp_url).getContent()); } } catch (IOException e) { e.printStackTrace(); } hotel_pic.setImageBitmap(temp); </code></pre> <p>P.S. You should't do it inside the main thread, move it to AsyncTask.</p> <p>Remember to provide proper URL in <code>http://domain</code> format inside <code>temp_url</code> <code>String</code> object.</p> <p><strong>EDIT : (full code)</strong></p> <pre><code>@Override public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); View rowView = inflater.inflate(list_resourceID, parent, false); final ImageView hotel_pic = (ImageView) rowView .findViewById(R.id.imageView_hotel_1); TextView hotel_name = (TextView) rowView .findViewById(R.id.textview_hotel_1); TextView hotel_name_descrip = (TextView) rowView .findViewById(R.id.textview_hotel_descrip); String hotel = List_Filler.GetbyId(position).getHotel_name(); String descri = List_Filler.GetbyId(position).getShort_description(); hotel_name.setText(hotel); hotel_name_descrip.setText(descri); String temp_url; StringTokenizer tokens = new StringTokenizer(List_Filler.GetbyId( position).getHotel_imgs(), "[\""); do { temp_url = (String) tokens.nextElement(); } while (false); temp_url = "http://" + temp_url.replace("\",""); Bitmap temp = null; try { if (temp_url.length() &gt; 5) { temp = BitmapFactory.decodeStream((InputStream)new URL(temp_url).getContent()); } } catch (IOException e) { e.printStackTrace(); } hotel_pic.setImageBitmap(temp); return rowView; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload