I have a doubt I have a listview and below it there is a background with a image. I would like to have the lists with a transparent color in order to see the image in the b
I managed to achieve this with the RecyclerView by adding this line of code to the 'onBindViewHolder' method in the 'RecyclerView.Adapter' class:
((RelativeLayout) holder.itemView).getChildAt(0).setBackgroundColor(Color.parseColor("#00FFFFFF"));
Bear in mind that the view returned by the above cast expression is an 'android.support.v7.widget.CardView' that contains the list item layout
Add following property in ListView...
android:cacheColorHint="#00000000"
it is for transparent background of ListView. More detail see Here.
You can also use an image editor to edit the opacity of the image/shape/gradient/whatever that you're using for the rows. I use Gimp because it's free. Here's what you need to do in Gimp: Go to the 'Layers - Brushes' window. Right-click the image layer and 'Add Alpha Channel'. Then just dial down the Opacity using the number picker (located above the layer) and File -> Export the image. Add this image to your project. Set it as the background for the List View rows. Then set the background for the List View itself to whatever you want to take up the entire background behind the List View.