Android:Does Recycler 视图与 Coordinator 布局一起使用?
Android:Does the Recycler view works with Coordinator layout?
参考引入的新 Android 设计支持库;我的问题是:
Recycler 视图是否适用于 Coordinator 布局?
因为在没有回收站视图的情况下我可以完美地获得滚动效果;但不使用它。
所以我只是想知道是否有人做过这方面的工作。
我正在尝试类似的东西
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/app_bar_layout"
layout="@layout/my_toolbar" />
<android.support.v7.widget.RecyclerView
android:id="@+id/pmp_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/app_bar"
android:scrollbars="vertical"
app:layout_scrollFlags="scroll|enterAlways"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
浪费了几个小时后,我发现我使用的是旧版本的库:
compile 'com.android.support:recyclerview-v7:21.0.+'
确保将其更新到最新版本:
compile 'com.android.support:recyclerview-v7:22.2.0'
也许有一个错误已在较新版本中修复。
Link 下面的内容很有帮助:
http://blog.grafixartist.com/material-design-tabs-with-android-design-support-library/
参考引入的新 Android 设计支持库;我的问题是:
Recycler 视图是否适用于 Coordinator 布局?
因为在没有回收站视图的情况下我可以完美地获得滚动效果;但不使用它。
所以我只是想知道是否有人做过这方面的工作。
我正在尝试类似的东西
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/app_bar_layout"
layout="@layout/my_toolbar" />
<android.support.v7.widget.RecyclerView
android:id="@+id/pmp_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/app_bar"
android:scrollbars="vertical"
app:layout_scrollFlags="scroll|enterAlways"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
浪费了几个小时后,我发现我使用的是旧版本的库:compile 'com.android.support:recyclerview-v7:21.0.+'
确保将其更新到最新版本:compile 'com.android.support:recyclerview-v7:22.2.0'
也许有一个错误已在较新版本中修复。
Link 下面的内容很有帮助:
http://blog.grafixartist.com/material-design-tabs-with-android-design-support-library/