【发布时间】:2017-03-08 23:03:49
【问题描述】:
我一直在到处寻找这个问题。 我已经将一个 LinearLayout 与父相对布局的底部对齐,还有一个 RecyclerView,作为同一级别的孩子,问题是该列表没有检测到底部的元素并且它滚动到最后,所以我看不到最后一个列表的行。 这是我的代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_marginTop="10dp"
android:clipToPadding="false"
android:clipChildren="false"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--some code-->
<LinearLayout
android:layout_below="@+id/comments"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerViewComments"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_alignParentBottom="true"
android:shadowColor="#000"
android:shadowDx="-2"
android:shadowRadius="8"
android:shadowDy="-10"
android:layout_marginTop="10dp"
android:layout_height="wrap_content">
<!--some code-->
</LinearLayout>
</RelativeLayout>
【问题讨论】: