Closed sayurabh closed 2 years ago
Hello @sayurabh I can't reproduce the issue, could you please share a screencast to understand the problem ? Thanks
Check snapshot in wormdotsindicator.kt adddots is only 5 accodingly click listener works upto 6 for viewpager if images are more than 6 dots will show but clicklistener will not work pls chk ur code is self explanatory.
Are you talking about the below part of code ?
if (isInEditMode) {
addDots(5)
addView(buildDot(false))
}
This only about the the preview in AndroidStudio using the boolean isInEditMode
, and this is not affecting the click listener of the dots
It is ok if u dont want to understand ur code fault ,this problem i mentioned is real when running viewpager i noticed that if images are beyond 6 dots will show but clicklistener will move to 0 on dot number 7 click u can reproduce this problem on ur own and can check and pls note viewpager it itself a preview no problem i m preparing java version of ur code with this critical bug fix as i domt know kotlin.
In WormDotsIndicator.kt file are set can be max 6 if imageviews are more than 6 more than 6 dots will reflect but beyond six dots will not be clickable, if one clickable dots beyond 6 dots will move to first. is their any option to remove clickable lock .