0

after updating the design library to v22.2.1 my activity layout won't scroll anymore. It was working fine prior to the update. The layout looks like this:

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
    style="@style/layout.content"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/app_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fitsSystemWindows="true">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:fitsSystemWindows="true"
            app:layout_scrollFlags="scroll|enterAlways"/>
    </android.support.design.widget.AppBarLayout>

    <FrameLayout
        style="@style/layout.content.root"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <include layout="@layout/progress_bar"/>

        <LinearLayout
            android:id="@+id/content"
            style="@style/layout.content.root">

            <include layout="@layout/layout_search_cities"/>

            <android.support.v7.widget.RecyclerView
                android:id="@+id/recycler_view"
                style="@style/layout.match"
                android:scrollbars="vertical"/>
        </LinearLayout>
    </FrameLayout>
</android.support.design.widget.CoordinatorLayout>

The only thing I could figure out is that if I change the recyclerView's parent from LinearLayout to FrameLayout everything is working fine:

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
    style="@style/layout.content"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/app_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fitsSystemWindows="true">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:fitsSystemWindows="true"
            app:layout_scrollFlags="scroll|enterAlways"/>
    </android.support.design.widget.AppBarLayout>

    <FrameLayout
        style="@style/layout.content.root"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <include layout="@layout/progress_bar"/>

        <FrameLayout
            android:id="@+id/content"
            style="@style/layout.content.root">

            <include layout="@layout/layout_search_cities"/>

            <android.support.v7.widget.RecyclerView
                android:id="@+id/recycler_view"
                style="@style/layout.match"
                android:layout_marginTop="?attr/actionBarSize"
                android:scrollbars="vertical"/>
        </FrameLayout>
    </FrameLayout>
</android.support.design.widget.CoordinatorLayout>

What am I missing?

r1m
  • 141
  • 1
  • 5

1 Answers1

0

It turns out that this was an issue with v22.2.1; I fixed it by advancing to design library v23.0.0.

durron597
  • 31,968
  • 17
  • 99
  • 158
r1m
  • 141
  • 1
  • 5
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment). – Rohit5k2 Aug 18 '15 at 12:46
  • I don't understand. Can you please explain? I'm pretty new to this so I would be grateful. I answered my own question and the answer is correct. It was a bug in the design library that is fixed in the update. – r1m Aug 18 '15 at 13:37