Android-Image-Slider icon indicating copy to clipboard operation
Android-Image-Slider copied to clipboard

sliderView.setCurrentPagePosition() does not work correctly

Open BastiBach opened this issue 5 years ago • 2 comments

Describe the bug When I use sliderView.setCurrentPagePosition(index) the Slider doesn't set the correct item.

I debugged until SliderPager::setCurrentItem().

if (mAdapter instanceof InfinitePagerAdapter) { item = ((InfinitePagerAdapter) mAdapter).getMiddlePosition(item); } This line delivers a number beyond 9000 (I only have 7 items in the list.)

When I skip the code, the item is set correctly.

How can I avoid the adapter to be InfinitePagerAdapter or else how to fix the wrong number?

Cheers, Bastian

BastiBach avatar Jul 14 '20 13:07 BastiBach

can u tell me how to implement it its very confusing i am beginner help me? or else send ur xml code and java code with implementation

ashokvippala21 avatar Aug 10 '20 12:08 ashokvippala21

@BastiBach any success in getting this worked? I have the same issue of sliderView.setCurrentPagePosition(index) does not set slider at correct index

@smarteist, please help

Mahmood-Hussain avatar Sep 16 '20 16:09 Mahmood-Hussain