Reputation: 6470
I have use HorizontalListView from this web but I don't know how to measure state of scroll.
Because I want to create HorizontalListView that automatically adjust when some element is half-visible after scrolling finishes.
000|111 222 333|444
0|00 111 222 3|33 444 --> |000 111 222|333
11|1 222 333 44|4 555 --> 111|222 333 444|555
I have try to set
if(mScroller.isFinished() && isFling){
// adjust
}
but that leave a problem when onFling
is not called.
but if I used ACTION_UP
if it has Fling then it becomes mess.
Any suggestion to achieve this? Thank for every help.
Upvotes: 1
Views: 320
Reputation: 2415
You can try modifying the code of the developer to get the current position of the list item by setting the Tag of any one of the object [TextView, Image etc], then comparing the same with your count or max count by getCount method of the Adapter.
Upvotes: 1