我在ScrollView中使用RecyclerView。滚动工作正在进行,但是当我使用毕加索时它并没有顺利进行。有人能指点我顺利吗。
MainActivity.java
recycler_view_ways = (RecyclerView) findViewById(R.id.recycler_view_ways);
recycler_view_ways.setLayoutManager(new GridLayoutManager(this, 3));
recycler_view_ways.setHasFixedSize(true);
recycler_view_ways.setNestedScrollingEnabled(false);
xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorGray">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view_ways"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view_type"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</RelativeLayout>
RVAdapter
/*if (type.getPhotos() != null && type.getPhotos().size() > 0) {
Picasso.with(context).load("http://cap.com/uploads/photos/" + type.getPhotos().get(0).getPhoto()).into(holder.img);
}*/