adding the style attribute via code
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2016249/how-to-programmatically-setting-style-attribute-in-a-view">How to programmatically setting style attribute in a view</a>  </p>
</blockquote>



<p>hello</p>

<p>I was wondering how to assign a style via code in adroid.</p>

<p>suppose I have a TextView created with the following snippet:</p>

<pre><code>TextView myText = new TextView(this);     
</code></pre>

<p>how do I assign the class xxx so that myText will be styled like an hard coded TextView like this:    </p>

<pre><code>&lt;TextView style="@style/xxx" /&gt; 
</code></pre>

<p>thanks</p>
