Xamarin.Android recyclerView fill parent height fully

Asked

Viewed 7 times

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:

inserir a descrição da imagem aqui

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.