I have a collapsing toolbar with tab layout and view pager, I am trying since so long and found to see that my collapsing toolbar is always collapsible whether I have a scrollable data or not. Why is this happening
<android.support.design.widget.AppBarLayout
android:id="@+id/appBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="2dp"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Light">
<android.support.design.widget.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways">
<FrameLayout
android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="250dp">
//Frame layout for some nested layouts in between
</FrameLayout>
</android.support.design.widget.CollapsingToolbarLayout>
</<android.support.design.widget.AppBarLayout>
Am I doing anything wrong. I wanted it to be scrollable only when the view pager pages have scrollable content with it.