Translucent TextView?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Translucent TextView?

Postby rockerboy » Mon Nov 16, 2009 4:27 am

Is it possible to have a TextView that is translucent? Android.Graphics.Color does not have the TRANSLUCENT color defined in it to set as the background color. Also I'm not able to use Java.awt.Color that has TRANSLUCENT defined.

I want my TextView to appear like the below: translucent so that other Views behind it are partially visible.

Image

Any suggestions? :?:

Thanks in advance. :)
rockerboy
Freshman
Freshman
 
Posts: 8
Joined: Sat Nov 14, 2009 3:27 am

Top

Postby FreakDev » Mon Nov 16, 2009 9:04 am

when you "define" a color, it can contain a value for the alpha channel

#[2 digits for hexa alpha value][2 digits for hexa red value][2 digits for hexa green value][2 digits for hexa blue value]

"00" means completly transparent, and "FF" means completly opaque

never test on textView, but it works fine for "EditText" background ;)
Last edited by FreakDev on Mon Nov 16, 2009 9:58 am, edited 1 time in total.
FreakDev
Junior Developer
Junior Developer
 
Posts: 12
Joined: Sun Nov 15, 2009 3:42 pm

Postby rockerboy » Mon Nov 16, 2009 9:56 am

Thank you. :D It works for TextView as well!
rockerboy
Freshman
Freshman
 
Posts: 8
Joined: Sat Nov 14, 2009 3:27 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 12 guests