INNER CODE UNIT · Kotlin

offset

tommybuonomo/dotsindicator · viewpagerdotsindicator/src/main/kotlin/com/tbuonomo/viewpagerdotsindicator/OnPageChangeListenerHelper.kt:13

            offset = lastPageIndex - .0001f
        }
        val leftPosition = offset.toInt()
        val rightPosition = leftPosition + 1

        if (rightPosition > lastPageIndex || leftPosition < 0) {
            return
        }

        onPageScrolled(leftPosition, rightPosition, offset % 1)

        if (lastLeftPosition != -1) {
            if (leftPosition > lastLeftPosition) {
                (lastLeftPosition until leftPosition).forEach {
                    resetPosition(it)
                }
            }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…