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

can not scroll to the top position when call smoothScrollToPosition(0) #68

Open
Hoalq-0026 opened this issue Nov 5, 2020 · 0 comments

Comments

@Hoalq-0026
Copy link

@rubensousa
Hi!
I have a problem. I can not scroll to the top position when the call method smoothScrollToPosition(0)
in source code:

ryclerviewTopic.apply {
                layoutManager = LinearLayoutManager(context)
               enableSnapping(false)
                adapter = topicAdapter
            }

ryclerviewTopic.smoothScrollToPosition(0)

 <com.github.rubensousa.gravitysnaphelper.GravitySnapRecyclerView
                        android:id="@+id/ryclerviewTopic"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:layout_behavior="@string/appbar_scrolling_view_behavior"
                        app:snapEnabled="false"
                        app:snapGravity="top"
                        app:snapMaxFlingSizeFraction="2"
                        app:snapScrollMsPerInch="50"
                        android:paddingTop="@dimen/_30dp"
                        tools:listitem="@layout/item_home_topic" />

Originally posted by @Hoalq-0026 in #64 (comment)

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

1 participant