Hello Simon,

For a button in a recent project I used:
How to set a button as transparent and blue:

button1.setBackgroundColor(Color.argb(125, 0, 0, 255));

the 1st set of digits (125) is the translucency.

Did you try dropping the '#' off your code in xml before asking?
Fred.


On 19/06/2011, Simon Platten <[email protected]> wrote:
> I am adding some views to a linear layout in code, I have set the colour of
> the text view as follows:
>
>             TextView tvImagesTitle = new TextView(this);
>             tvImagesTitle.setTextColor(R.color.blue);
>             tvImagesTitle.setText("Some text");
>             m_llImages.addView( tvImagesTitle );
>
> However the text comes out grey, the value of the blue resource is:
>
> <color name="blue">#ff0000ff</color>
>
>
> Any ideas?
>
> --
> Regards,
> Sy
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to