recyclerView.smoothScrollToPosition(0);
floating button을 눌렀을 때 이와 같은 함수를 사용해서 위로 스크롤 하려고했는데 작동이 되지 않습니다.
버튼의 클릭 이벤트는 정상적으로 작동됨을 확인 했는데 NestedScrollView안에 구현을 해서 그런지 무슨 이유에서 인지 작동하지 않아요 ㅠㅠ...
정확히 Coordinary Layout에
<include
android:id="@+id/include"
layout="@layout/content_main" />
으로 레이아웃을 포함 시켰고
포함시킨 레이아웃에 (content_main.xml)이 아래와 같습니다.
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nestedScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/activity_mainpage">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</android.support.v4.widget.NestedScrollView>
방법을 알 수 있을까요?ㅠㅠ