Skip to content

the last dot in indicator not getting selected when last item of recyclerview is reached by scrolling #32

Open
poojasngh432 opened this issue Jan 27, 2021 · 0 comments

Comments

@poojasngh432
Copy link

poojasngh432 commented Jan 27, 2021

` <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />

    <ru.tinkoff.scrollingpagerindicator.ScrollingPagerIndicator
        android:id="@+id/indicator"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/recycler_view"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        android:layout_marginBottom="@dimen/_5sdp"
        app:spi_dotSize="@dimen/_5sdp"
        app:spi_dotSelectedSize="@dimen/_5sdp"
        app:spi_visibleDotCount="5"
        app:spi_visibleDotThreshold="5"/>`

vHolder.indicator.attachToRecyclerView(vHolder.recyclerView,0); vHolder.indicator.setCurrentPosition(0); vHolder.indicator.setDotColor(vHolder.recyclerView.getContext().getResources().getColor(R.color.unselected_green)); vHolder.indicator.setSelectedDotColor(vHolder.recyclerView.getContext().getResources().getColor(R.color.selected_dark_green)); vHolder.indicator.setDotCount(RemoteConfigManager.init().getFeedFeatureNavList().size());

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

No branches or pull requests

1 participant