0
Hello, everybody.
I’m making a Recyclerview with a Textview and an Imageview that is loaded from the bank. The problem is when this image is null. Recycler View goes well into a certain part and then it starts to put images that don’t exist where there is image==null.
I tried it with Picasso and Fresco, and it’s the same mistake. And it’s not every time that it happens, just sometimes, randomly. The Views that have picture are perfect.
I’m doing a random, so that the data is displayed randomly. Can someone help me? I’m using the following:
Random gerador = new Random();
position = gerador.nextInt(listadicas.size());
final ParseObject dican = listadicas.get(position);
holder.tituloDica.setText(dican.getString("nome"));
if (dican.getParseFile("foto") != null) {
holder.fotodica.setVisibility(View.VISIBLE);
holder.fotodica.setImageURI(dican.getParseFile("foto").getUrl());
}
Thank you
tries to leave the imageview with "imgView.setVisibility(View.GONE);" when there are no images.
– Mr_Anderson
Hey, Anderson. I’ve tried, but it happens anyway .
– Elaine Breda Schwaner
Have to paste your recyclerview all over here?
– Mr_Anderson