How To Pass Spanned Data-type Data Using Intent
I am passing some data from one activity to another. All the data are passing alright but there one with data type Spanned which isnt working at all. When I display it in the first
Solution 1:
getContent()
would need to return a CharSequence
. Then, use getCharSequenceExtra()
, not getStringExtra()
, saving it to a CharSequence
variable.
IOW, strings do not have spans. CharSequence
objects have spans. When you convert a CharSequence
to a string via toString()
, you lose the spans.
Post a Comment for "How To Pass Spanned Data-type Data Using Intent"