
위 스크린 샷에서 보시면 리사이클러 뷰를 스크롤 하면 toolbar가 위로 숨는 액션을 처리하고 싶은데요.
collapseMode를 뷰 여기저기에 넣어보면서 실험해 봐도 올라가지를 않네요.
혹시 아시는 분 계신가요. layout은 아래와 같습니다.
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary">
<android.support.design.widget.AppBarLayout
android:id="@+id/study_app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<android.support.v7.widget.Toolbar
android:id="@+id/study_tool_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_collapseMode="parallax"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView
android:id="@+id/study_tool_bar_title_txt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="5dp"
android:text="@string/app_name"
android:textColor="#ffffff"
android:textSize="20sp"
android:textStyle="bold"
/>
<TextView
android:id="@+id/introduce_app_txt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="1dp"
android:layout_marginRight="17dp"
android:layout_marginTop="5dp"
android:background="@drawable/rectangle_back"
android:elevation="2dp"
android:text="@string/introduce_app_txt"
android:textColor="#ffffff"/>
</LinearLayout>
</android.support.v7.widget.Toolbar>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/study_tab_recycler"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/study_app_bar"
android:layout_marginTop="2dp"
android:layout_marginBottom="90dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
</android.support.v7.widget.RecyclerView>
</android.support.design.widget.CoordinatorLayout>