DevsmartLib-Android icon indicating copy to clipboard operation
DevsmartLib-Android copied to clipboard

Fixed scrooling

Open applm opened this issue 12 years ago • 4 comments

requestLayout used to be called in every scroll step which is wrong and would probably cost you more than you get by view pooling. Corect behaviour is use computescrool to do all computation. This method is invoked automaticaly by invalidate

applm avatar Feb 18 '13 13:02 applm

why make the function "scrollTo" into comment? // public void scrollTo(int x) { // mScroller.startScroll(mNextX, 0, x - mNextX, 0); // invalidate(); // }

JiraiyaJunya avatar Mar 04 '13 15:03 JiraiyaJunya

Probably wasnt needed and its name is in conflict with Views method used to change scroll position. I guess you can uncoment it and change name if you need it.

applm avatar Mar 04 '13 19:03 applm

thanks very much.Then how to use setSelection(int pos)?any ideas?

JiraiyaJunya avatar Apr 04 '13 03:04 JiraiyaJunya

That is not implemented there i gues. If you want to implement it, you have to store somewhere position of selected view and that call set selection when it comes on screen and remove selection when it goes of screen

2013/4/4 JiraiyaJunya [email protected]

thanks very much.Then how to use setSelection(int pos)?any ideas?

— Reply to this email directly or view it on GitHubhttps://github.com/dinocore1/DevsmartLib-Android/pull/27#issuecomment-15877595 .

applm avatar Apr 04 '13 15:04 applm