Adding style attribute through code

Possible duplicate:
How to programmatically set a style attribute in a view

Hello

I was wondering how to assign a style using code in adroid.

Suppose I have a TextView created with the following snippet:

TextView myText = new TextView(this);     

      

how to assign class xxx so that myText is styled as hard text TextView like this:

<TextView style="@style/xxx" /> 

      

thanks

+2


a source to share





All Articles