Warm tip: This article is reproduced from serverfault.com, please click

Recyclerview dont show images

发布于 2020-11-27 22:26:20

i have been trying to display images in my recyclerview, i had seen a lot of tutorials, but i can't.

this is my onBindViewholder in my adapter class



   @Override
   public void onBindViewHolder(@NonNull final cowviewHolder holder, int position) {
       final Cow vacaslist = vacas.get(position);
       holder.textViewinterno.setText(vacaslist.interno);
       holder.textViewsiniiga.setText(vacaslist.siniiga);
      Picasso.get().load(vacaslist.ulr)
               .resize(80,80).centerCrop().error(R.drawable.ic_imageinf).into(holder.imageviewrec);

This is my database in firebase, im taking the images from storage

enter image description here

Thanks.. If need more info let me know

Questioner
Armayeestr
Viewed
0
Taha Malik 2020-11-28 09:19:01

I think the problem is your ulr variable name because on firebase it is url so, if you are instantiating your Cow object using following syntax:

ref.child("Vacas").child("$id").getValue(Cow.class);

Then ulr will be null.