RSS

Set transparent background of an imageview in Android

29 Jan

How to calculate transparent color in Android with 8 digit format (#xxxxxxxx):

Ex we want to use only 50% of background color

x = 50/100 * 255 = 127.5 => x = 127 and convert 127 from decimal to hexadecimal

=> x (hex) = 7F.

Finnaly => 50% => #7F000000

 

Referenced by: http://stackoverflow.com/questions/1492554/set-transparent-background-of-an-imageview-in-android

Advertisements
 
Leave a comment

Posted by on January 29, 2015 in Android, Mobile Development

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: