I am fetching record and pictures from mysql e.g I am fetching teacher information and there pictures. Every thing is working fine instead of fetching images. How i can fetch images and place them to recyclerview. I am using retrofit. In adapter
onBindViewHolder
public void onBindViewHolder(MyViewHolder holder, final int position) {
holder.tName.setText(subjects.get(position).getName());
holder.tEmail.setText(subjects.get(position).getEmail());
holder.tRoom.setText(subjects.get(position).getPhoneNum());
Glide.with(holder.tPicture.getContext()).load(subjects.get(position)).into(holder.tPicture);
And here is mainActivity response
call.enqueue(new Callback<List<Teache_GetterAndSetter>>() {
@Override
public void onResponse(Call<List<Teache_GetterAndSetter>> call, Response<List<Teache_GetterAndSetter>> response) {
subjects = response.body();
adapter =new TeacherAdapterApi(subjects,getApplicationContext());
recyclerView.setAdapter(adapter);
dialog.dismiss();
}
Note: Php script is working file. Here is php response: [{"T_id":39,"T_u_name":"Adnan","T_f_name":"fahad","T_email":"mirzafahadi1122@gmail.com","T_num":"03225898717","T_m_name":"pakistan","T_pic":"a.png","room":"G-001"}]
The problem is i am not getting images from mysql.