Open Hoalq-0026 opened 3 years ago
@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 https://github.com/rubensousa/GravitySnapHelper/issues/64#issuecomment-722192004
@rubensousa Hi! I have a problem. I can not scroll to the top position when the call method smoothScrollToPosition(0) in source code:
ryclerviewTopic.smoothScrollToPosition(0)
Originally posted by @Hoalq-0026 in https://github.com/rubensousa/GravitySnapHelper/issues/64#issuecomment-722192004