Unable to set color for spanned string in android
<p>I am trying to put color for Spanned String,But the color is not applying.Its shows same color </p>

<p>as text view color.The code which i wrote.</p>

<pre><code>TextView desc2=(TextView)listrow.findViewById(R.id.desc222);
desc2.setText(Html.fromHtml("&lt;font color='#811c1d'&gt;&lt;b&gt;MyText&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;").toString());
</code></pre>

<p>if i remove "toString()" it throws</p>

<pre><code>04-24 06:20:58.750: E/AndroidRuntime(309): java.lang.StackOverflowError
04-24 06:20:58.750: E/AndroidRuntime(309):  at java.lang.reflect.Array.newInstance(Array.java:473)
04-24 06:20:58.750: E/AndroidRuntime(309):  at android.text.SpannableStringInternal.getSpans(SpannableStringInternal.java:243)
04-24 06:20:58.750: E/AndroidRuntime(309):  at android.text.Styled.drawUniformRun(Styled.java:61)
04-24 06:20:58.750: E/AndroidRuntime(309):  at android.text.Styled.drawDirectionalRun(Styled.java:298)
04-24 06:20:58.750: E/AndroidRuntime(309):  at android.text.Styled.drawText(Styled.java:357)
04-24 06:20:58.750: E/AndroidRuntime(309):  at android.text.Layout.drawText(Layout.java:1387)
04-24 06:20:58.750: E/AndroidRuntime(309):  at android.text.Layout.draw(Layout.java:370)
04-24 06:20:58.750: E/AndroidRuntime(309):  at android.text.BoringLayout.draw(BoringLayout.java:365)
04-24 06:20:58.750: E/AndroidRuntime(309):  at android.widget.TextView.onDraw(TextView.java:4050)
04-24 06:20:58.750: E/AndroidRuntime(309):  at android.view.View.draw(View.java:6740)
</code></pre>

<p>Can any one tell me what the problem is</p>
