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
Post a Comment