Android - Empty items generated on scroll in RecyclerView -


i using recyclerview in order show list of different items. problem on fast scroll items being randomly generated empty, if scroll , down again different item can generated empty. happens on lg g2 , i've checked on lg g4 , not happens there.

this mean empty item: enter image description here

this onbindviewholder in adapter:

@override public void onbindviewholder(viewholder viewholder, int position) {     final int finalposition = viewholder.getadapterposition();     final string url = results.get(finalposition).geturl();     viewholder.tvurl.settext(url.replacefirst("^(http://|www\\.|http://|www\\.|https://)", ""));     viewholder.tvcopiedwords.settext(string.format(locale.getdefault(), "%1$d", results.get(finalposition).getnumberofcopiedwords()));     viewholder.tvpercents.settext(string.format(locale.getdefault(), "%1$d%%", results.get(finalposition).getpercents()));     viewholder.itemview.setonclicklistener(new view.onclicklistener() {         public void onclick(view v) {             intent = new intent(activity, resultwebviewactivity.class);             i.putextra("url", url);             i.putextra("process", process);             i.putextra("share", activity.getstring(r.string.export_scan) + ":" + system.getproperty("line.separator")                     + url + system.getproperty("line.separator")                     + activity.getstring(r.string.results_similarity, results.get(finalposition).getpercents()) + system.getproperty("line.separator")                     + activity.getstring(r.string.results_copied_words, results.get(finalposition).getnumberofcopiedwords()));             activity.startactivity(i);         }     }); } 

if need piece of code in order comment , add.

any ideas?


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -