I created a code that perfectly matches the results via JSON from my database and populates my ListView with Strings, but I'd like the database to bring it from the "image" column I created, the image-related address : link ) and the ListView loaded this image into it through the address recorded in the database, the addresses of the images I've tried in several ways, but I could not, I'll post the code that fills my ListView with only strings, because this code is working correctly:
private void showEmployee(){JSONObject jsonObject = null;
ArrayList> list = new ArrayList>();
try { jsonObject = new JSONObject(JSON_STRING); JSONArray result = jsonObject.getJSONArray(Config.TAG_JSON_ARRAY);
for(int i = 0; i<result.length(); i++){ JSONObject jo = result.getJSONObject(i); String id = jo.getString(Config.TAG_ID); String name = jo.getString(Config.TAG_NAME); String salary = jo.getString(Config.TAG_SAL); String image = jo.getString(Config.TAG_IMAGE); HashMap<String, String> employees = new HashMap<>(); employees.put(Config.TAG_ID,id); employees.put(Config.TAG_NAME,name); employees.put(Config.TAG_SAL,salary); employees.put(Config.TAG_IMAGE,image); list.add(employees); } } catch (JSONException e) { e.printStackTrace(); } //ListAdapter SimpleAdapter adapter = new SimpleAdapter( ViewAllEmployee.this, list, R.layout.list_item, new String[]{Config.TAG_ID,Config.TAG_NAME, Config.TAG_SAL, Config.TAG_IMAGE}, new int[]{R.id.id, R.id.name, R.id.salary, R.id.image} ); listView.setAdapter(adapter); }