0
I have a recyclerView
and a linearLayout
, both brothers and sons of a relativeLayout
. The linearLayout should always be aligned below, so I would like Recycler to occupy all of the father’s space, but respecting the brother’s space without throwing him off the screen. I used the match_parent in the Recycler to fill the father and alignParentBottom in the linearLayout, but the linearLayout was superimposed and the items of the Recycler were behind in a weird way. How do I make the height of the Recycler fill the height of the father, but respect the height of the brother?
<RelativeLayout
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:scrollbars="vertical"
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
<LinearLayout
android:id="@+id/linearLayout"
android:layout_alignParentBottom="true"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="90dp">
</RelativeLayout>
As stated, the linearLayout is superimposed on the items in the Recycler. Image: