android - Why RecyclerView is scrolling way too more above the first item and flickering while scrolling? -


edit: problem solved !!

my recyclerview flickers while scrolling. there 5-6 items in single screen. when scroll down, screen flickers , scroller jumps top of recyclerview. after if scroll again, reccyclerview scrolls way more above first item. if repeated scrolling , down process fast, recycler view scrolls down leaving empty background. , after if scroll either ways nothing shows up. scroller not work again after this.

i using lucasr 2 way view. problem discussing mentioned in some weird recyclerview.adapter , uil not solved yet. have more 20 images in recyclerview, increased. each image of size greater 100kb.

for loading image, tried universal image loader(uil) caching enabled. didn't help.the flickering persists uil. tested glide problem still there.

to make more clearer here snapshots adm. <code>recyclerview</code> flickering during scrolling issue.

here's holder class:

public class tileadapter extends basetwowayviewadapter {  private static final string tag = makelogtag(tileadapter.class); private context context; private list<usercategory> itemslist;  public tileadapter(context context, list<tile> itemslist) {     super(context, itemslist);     this.context = context;     this.itemslist = itemslist; }  @override public testholder oncreateviewholder(viewgroup parent, int viewtype) {     view v = layoutinflater.from(parent.getcontext()).inflate(r.layout.single_tile_full_length, null);     testholder tileholder = new testholder(v);     return tileholder; }  @override public void onbindviewholder(recyclerview.viewholder holder, final int position) {     final test tile = itemslist.get(position);     final testholder tileholder = (testholder) holder;     final view itemview = tileholder.itemview;     tileholder.bindholder(tile); }  /**  * view holder class  */ public class testholder extends recyclerview.viewholder {     private textview titletextview;     private imageview imageview;     private imageloader imageloader;      public testholder(view view) {         super(view);         this.titletextview = (textview) view.findviewbyid(r.id.titletextview);         this.imageview = (imageview) view.findviewbyid(r.id.imageview);         imageloader = new imageloader(context);     }      void bindholder(final tile tile) {         titletextview.settext(tile.getname());          if(imageview != null) {                             viewparent parent = imageview.getparent();             int backgroundcolor = context.getresources().getcolor(r.color.backgroundcolor);             if (parent != null && parent instanceof view) {                 ((view) parent).setbackgroundcolor(backgroundcolor);             } else {                 imageview.setbackgroundcolor(backgroundcolor);             }              imageloader.loadimageusingresid(tile.getimageresourcesid(), true, imageview);         }     } } 

}

and here's how setting adapter recyclerview:

tileadapter tileadapter = new tileadapter(getactivity(), itemslist); mrecyclerview.setadapter(tileadapter); 

my issue solved replacing baselayoutmanager file of lucasr 2 way view file given here


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -