How to slide a listview by interacting with seekbar -
i have listview , seekbar, want listview react accroding interaction seekbar.
for ex :- if seekbar dragged either ends, listview should automatically go or down.
any appreciated.
you should able use list view method: smoothscrolltoposition(int) , onseekbarchangelistener
set onseekbarchangelistener on seekbar. in onprogresschanged add code using smoothscrolltoposition update listvew position. this:
public void onprogresschanged (seekbar seekbar, int progress, boolean fromuser) { listview.smoothscrolltoposition(progress); //assuming have 1 seekbar position each row in list, otherwise you'll need calculation compute new list view position. }
alternatively, use onstoptrackingtouch method if want scroll final position user touched in seekbar.
Comments
Post a Comment