<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="fragments.ProfileFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="100"
android:orientation="vertical">
<FrameLayout
android:id="@+id/cover_bg"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="40"
android:gravity="center">
<com.android.volley.toolbox.NetworkImageView
android:id="@+id/img_cover"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="35dp"/>
<com.android.volley.toolbox.NetworkImageView
android:id="@+id/img_profile"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|center"
android:padding="2dp"
android:background="@color/white"
android:foregroundGravity="center"/>
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="60"
android:weightSum="100"
android:orientation="vertical"
android:paddingTop="20dp">
<TextView
android:id="@+id/txt_edit_profile"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/edit_profile"
android:layout_gravity="center"
android:textColor="#00f"
android:textStyle="bold"
android:layout_marginBottom="20dp"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
第一次回收者观看者似乎没问题。但 当我滚动页面时,recyclerviewer&#39; s行之间有空格。 我该如何解决这个问题?
我将recyclerviewer的高度设置为wrap_content但它没有&#39;工作,我也试过match_parent
答案 0 :(得分:0)
我在我的应用程序中遇到了这个问题。过了一段时间我得到了解决方案。 recyclerView中存在一个特定于版本的错误。
然后我尝试编译它的另一个版本并得到修复
compile 'com.android.support:recyclerview-v7:23.0.+'
这可以解决你的问题......试试吧。