Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dots : Random Size when looping banner #66

Closed
ghost opened this issue Nov 20, 2019 · 5 comments
Closed

Dots : Random Size when looping banner #66

ghost opened this issue Nov 20, 2019 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 20, 2019

Hi, thankss for this Awesome Library, i love it :D,
hi dev i have issue when looping banner with ViewPager + DotsIndicator....

in my case, for example i have 10 banner auto looping, and when reaching last banner , viewPager set banner position to 0 again, and the issue coming, Dots Size are become randomizing sized after the last banner....

Untitled

im sorry for my broken english :D

@tommybuonomo
Copy link
Owner

tommybuonomo commented Nov 20, 2019

Hi @odlsoon, are you sure that you're using the last version 4.1.2?

@ghost
Copy link
Author

ghost commented Nov 20, 2019

@tommybuonomo thanks for response :D, sorry, im forgot about write the version, im using version 3.0.3 because, still using AppCompat instead of AndroidX

@Jason-wam
Copy link

I meet the same problem,the indicator always skip first position.
I'm using the version 4.2
QQ图片20210815005054

@Jason-wam
Copy link

i meet the problem in loop viewpager2

@tommybuonomo
Copy link
Owner

Hey I succeeded to make it work with this piece of code using the last version of the library (4.3)

fun triggerNextPageDelayed() {
    Handler().postDelayed({
        val nextItem = if (viewPager2.currentItem == adapter.itemCount - 1) {
            0
        } else {
            viewPager2.currentItem + 1
        }
        viewPager2.currentItem = nextItem
        triggerNextPageDelayed()
    }, 500)
}
triggerNextPageDelayed()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants