Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recyclerview transparent background

Tags:

android

How do I make my Recyclerview transparent. Not the items in it, but the actual component itself so I can see the view behind it. I tried this:

android:background="@android:color/transparent"

But it doesn't work. If set it to a color (like red or blue) using that attribute it works though...

like image 219
Drake Avatar asked May 08 '17 17:05

Drake


1 Answers

Try using this:

<android.support.v7.widget.RecyclerView
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:background="@null" />

with this, your RecyclerView's background will be null and you can see the Parent View's background.

like image 100
Oğuzhan Döngül Avatar answered Oct 22 '22 02:10

Oğuzhan Döngül