CoordinatorLayout使用viewpager的recyclerview [英] CoordinatorLayout using the viewpager's recyclerview

查看:429
本文介绍了CoordinatorLayout使用viewpager的recyclerview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的视图 CoordinatorLayout android.support.design 我的主要问题是,你怎么可以附加在应用程序:layout_behavior 的片段RecyclerView

I am using the view CoordinatorLayout from android.support.design my main problem is that how can you attach the app:layout_behavior to the fragments RecyclerView?

在由谷歌所举的例子,他们只能将其连接在该 CoordinatorLayout 附有相同的XML文件的RecyclerView。

In the example given by google they only attach it in the RecyclerView of the same xml file where the CoordinatorLayout was attached.

有没有办法来CoordinatorLayout附加到片段RecyclerView的ViewPager?

Is there a way to attach CoordinatorLayout to the Fragments RecyclerView within the ViewPager?

该示例是<一个href="http://android-developers.blogspot.ca/2015/05/android-design-support-library.html">here:

推荐答案

这可能是愚蠢的,但它并没有因为这一事实,即构建工具并没有在 build.gradle更新工作的应用程序版本为22,我用的是21,这就是为什么它不工作的预计。

This might be dumb, but it didn't worked due to the fact that the build tool was not updated in the build.gradle of the application version to 22, I was using 21 that is why it is not working as expected to be.

编辑:

还有什么SanderTuit说:加入 com.android.support:recyclerview-v7:22.2.0 也将解决这个问题

Also what SanderTuit said: adding com.android.support:recyclerview-v7:22.2.0 will also solve the problem

这篇关于CoordinatorLayout使用viewpager的recyclerview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆