<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
当RecyclerView外面再加一层 SwipeRefreshLayout的时候
app:layout_behavior="@string/appbar_scrolling_view_behavior"
这句话为什么要放到上一层?变成这样:
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
为什么要把app:layout_behavior="@string/appbar_scrolling_view_behavior"放到上一层呢?
撒科打诨
相关分类