1

I can't get my relativelayout to be able to be set to transparent. I have tried many different methods, custom view from class, adding android:background="@android:color/transparent" etc. They either show a white like in the picture below, or they show a solid color of whatever the hex is?

enter image description here

Even programmatically using '.setBackgroundColor(Color.TRANSPARENT);' results in the above picture.

arayray
  • 241
  • 6
  • 19
  • There must be something on the background, if you set background of root layout as transparent you will see only default background color. – Oknesif Nov 27 '13 at 19:23
  • hi, this is not a comment related to your question, but can you tell me how to have cards in app? do you use nadav fimas library? or anything other – Maulik Sheth Nov 27 '13 at 19:27
  • @MaulikSheth Google 'android listview card style'. Its simply a background for each item. You can customize it to look exactly like a card. – arayray Nov 27 '13 at 19:39

3 Answers3

1

Figured it out. The main LinearLayout of my view was the layout making it have a white background. I added my view under my listview in a RelativeLayout and it works great. Thanks all!

arayray
  • 241
  • 6
  • 19
0

Try using this :

android:background="#00000000"
Manishika
  • 5,478
  • 2
  • 22
  • 28
0

Try using #AARRGGBB instead of #RRGGBB

Do this as following:

android:background="#AARRGGBB"

becomes:

android:background="#77000000"

The first 2 (AA) will set the transparancy. Set 77 to 00 for zero transparancy,

Dion Segijn
  • 2,625
  • 4
  • 24
  • 41
  • No luck, tried it several times like that. Even setting it programmatically with no luck. I am using an on my layout if it makes any difference. – arayray Nov 27 '13 at 19:37