java - How to scroll to bot of listview -


this question has answer here:

i have list view filled data server , when user swipe bot add 8 items list problem scroll go top every time when user scroll. how can set scroll got last item in list. tried listview.smoothscrolltoposition(merchantadapter.getcount()); it's not working

here implementation of refresh method

  swipyrefreshlayout = (swipyrefreshlayout) rootview.findviewbyid(r.id.refreshsales);     swipyrefreshlayout.setonrefreshlistener(new swipyrefreshlayout.onrefreshlistener() {         @override         public void onrefresh(swipyrefreshlayoutdirection direction) {             if (direction == swipyrefreshlayoutdirection.bottom) {                 index++;                  swipyrefreshlayout.setrefreshing(false);                 showlist();                progressbar.dismiss();               }         }     });      showlist();     return rootview; } 

easily add xml of list view :

android:stackfrombottom="true" android:transcriptmode="alwaysscroll" 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -