I did the following and it's works !

                SpannableString s = new SpannableString("Toto is bold...");
                s.setSpan(new StyleSpan(Typeface.BOLD), 0, 4, 0);
                remoteViews.setTextViewText(R.id.txt, s);

Thanks

Alix

On 19 août, 02:32, Jeff Sharkey <[email protected]> wrote:
> Because this is across RemoteViews not all TextView methods are
> available.  In this case, using a SpannableString to mark a bold
> region should work, since it's a CharSequence.
>
> j
>
>
>
> On Tue, Aug 18, 2009 at 9:16 AM, Alix<[email protected]> wrote:
>
> > Hello,
>
> > I have a widget with a TextView. I can change text and color of this
> > TextView like this :
>
> > remoteViews.setTextViewText(R.id.txt, "Sample");
> > remoteViews.setTextColor(R.id.txt, Color.RED);
>
> > But I need to put this TextView "bold" conditionnaly... How can I do
> > that ?
>
> > Thanks in advance...
>
> > Alix
>
> --
> Jeff Sharkey
> [email protected]
--~--~---------~--~----~------------~-------~--~----~
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