views:

35

answers:

1

Hi!

I was wondering if there is an easy way to strike text within an app widget in Android. In a normal activity, it is pretty easy, using textview flags:

textView.setPaintFlags(textView.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);

But since in an app widget, I can use only remoteviews... I do not know if this is possible

Anyone know something about this?

Thanks!

A: 

I've done this on a regular (local) TextView, and it should work on the remote variety since the docs list the method as equivalent between the two:

remote_text_view.setText(Html.fromHtml("This is <del>crossed off</del>."));

Blrfl
It does not work :(. I am doing this: remoteView.setTextViewText(R.id.text, Html.fromHtml("<del>" + value + "</del>"));
Antonio
It might be that `<del>` isn't supported by `Html.fromHtml()`. Have you tried `<strike>` or `<s>`?
Blrfl
Thanks Blrfl, but it does not work either. It seems that only a few HTML tags are suported by Html.fromHtml().
Antonio
Bummer. Sorry I couldn't help.
Blrfl