android - Recyclerview The list is not added when scrolling -


       v = minflater.inflate(r.layout.adapter_list_page, container, false);       switch (position) {         case 0:             arraylist<goods_data> list;             log.d("list_activity", "onloadmoreislastitem1 ///////////////////////////////////////// ");             log.d("list_activity", "instantiateitem switch1 position " + position);             rvongoing = (recyclerview) v.findviewbyid(r.id.rv_ongoing);             final linearlayoutmanager mlayoutmanager = new linearlayoutmanager(ct, linearlayoutmanager.vertical, false);             list = superms_activity.getcreditloan_list();             rvongoing.setlayoutmanager(mlayoutmanager);             rvongoing.setadapter(new good_itemadapter(ct, list));             rvongoing.addonscrolllistener(new recyclerview.onscrolllistener() {                 @override                 public void onscrolled(recyclerview recyclerview, int dx, int dy) {                     super.onscrolled(recyclerview, dx, dy);                     visibleitemcount = recyclerview.getchildcount();                     totalitemcount = mlayoutmanager.getitemcount();                     firstvisibleitem = mlayoutmanager.findfirstvisibleitemposition();                     lastvisibleitemposition = mlayoutmanager.findlastcompletelyvisibleitemposition();                       if (totalitemcount > 0 && lastvisibleitemposition != recyclerview.no_position && (totalitemcount - 1 <= lastvisibleitemposition)) {                         islastitem = true;                      } else {                         islastitem = false;                      }                  }                  @override                 public void onscrollstatechanged(final recyclerview recyclerview, int newstate) {                     super.onscrollstatechanged(recyclerview, newstate);                      if (islastitem && newstate == recyclerview.scroll_state_idle) {                          new handler().postdelayed(new runnable() {                             @override                             public void run() {                                 ((list_activity) ct).listresetsetting(superms_activity.id_appended_loading, 01);                                 recyclerview.getadapter().notifydatasetchanged();                             }                         }, 1000);                       }                 }              });             break; 

recyclerview list not added when scrolling. list has increased. recyvlerview screen not long incremented list.

recyclerview in pageradapter


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -