【发布时间】:2016-07-22 06:02:28
【问题描述】:
我使用 RecyclerView 使用 Volley Library 显示一些 JSON 数据。我正在获取 JSON 数据,但最初显示数据时,它的格式正确。但是当我在 recyclerview 中滚动时,行之间会增加巨大的空间。
滚动后 这是 row.xml 的 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">
<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/iv_image"
android:textSize="18sp"
/>
</RelativeLayout>
这里是xml中添加的recyclerview
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</android.support.design.widget.CoordinatorLayout>
提前致谢。
【问题讨论】:
标签: android json scroll android-recyclerview