android - Scroll to particular span in listview -


i want create view quran majeed ie multiple selectable parts of listview item. quran majeed app

i have done using clickable span , have managed add clickable functionality have problem. implementing reciting on user click , listview should have scroll during recitation.

my app

i have used

listview.scrollto(0, onclickview.gety()) 

but gety() returns 0 every time

use recycler view instead , following:

linearlayoutmanager layoutmanager = ((linearlayoutmanager)mrecyclerview.getlayoutmanager());   int lastvisibleposition =layoutmanager.findlastvisibleitemposition(); 

next following:

mrecyclerview.smoothscrollto(lastvisibleposition); 

Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -