I looked at the Intent before I trigger startActivity in ActivityA.
It's all there and when I append it to an EditText in this Activity,
the image is displayed.

Then when I look at the Intent in onCreate of ActivityB the <img .. />
is replaced by  (&#65532;) and that is what is shown in the EditText.

I will do some debugging and see what I come up with.

On Jun 24, 1:08 pm, Mark Murphy <[email protected]> wrote:
> How are you generating your --START-- --END-- output? If you're
> dumping that to LogCat, I wouldn't be surprised if you get gibberish
> output. What happens if you put the SpannedString into a TextView?
>
>
>
>
>
>
>
>
>
> On Fri, Jun 24, 2011 at 7:04 AM, rochdev <[email protected]> wrote:
> > In the new Activity, which I don't have control of, the HTML is
> > appended to an EditText so it have to be passed styled. I'm just
> > curious of this behavior, why and where it's replaced.
>
> > On Jun 24, 12:18 pm, Mark Murphy <[email protected]> wrote:
> >> Why not just pass the HTML as a String?
>
> >> On Fri, Jun 24, 2011 at 2:47 AM, rochdev <[email protected]> wrote:
> >> > Hi,
>
> >> > I'm unsure if this is a feature or a bug.
>
> >> > What I'm trying to do is to pass some styled text between two
> >> > activities.
>
> >> >        final Intent intent = new Intent(this, ActivityB.class);
> >> >        intent.putExtra("message", Html.fromHtml("My <b>image</b> <br />
> >> > <img src=\"http://example.com/image.png\"; />", imageGetter, null));
> >> >        startActivity(intent);
>
> >> > Then when I retrieve my text in the new Activity the entire img tag is
> >> > replaced by &#65532; (OBJ - symbol).
>
> >> >        CharSequence message = intent.getCharSequenceExtra("message");
>
> >> >        ----START message----
> >> >        <p>My <b>image</b> <br>
> >> >        &#65532;</p>
> >> >        ----END----
>
> >> > Any thoughts?
>
> >> > --
> >> > 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
>
> >> --
> >> Mark Murphy (a Commons 
> >> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> >> Android Training in London:http://bit.ly/smand1,http://bit.ly/smand2
>
> > --
> > 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
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in London:http://bit.ly/smand1,http://bit.ly/smand2

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