This could help you,
Spannable text = (Spannable) textView.getText()
text.setSpan(new ForegroundColorSpan(Color.BLACK), start, end,
                        Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

On Wed, Nov 12, 2008 at 4:57 PM, Peter <[EMAIL PROTECTED]> wrote:

>
> I'm using LinearLayout and TextView to output some text. The problem
> I'm having is that I need half the text on one line to be the default
> color and on the other side I want it to be green for example. Is this
> possible? Again I need the text on the same line using Linearlayout.
>
> Right now I have:
>
> TextView tv1 = (TextView) findViewById(R.id.data);
>        tv1.setText(data+ data1);
>
> I need the data1 to be green...
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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