Spanned How to use?

by John Doe » Wed, 11 Mar 2009 03:21:17 GMT

Sponsored Links
 I have looked a lot on the internet but I couldnt find anything. So
thats why I am asking it here.

While parsing an RSS I had to use Spanned class.

Spanned spanned;
spanned =  Html.fromHtml(content);

content string keeps the html content in it. when i check spanned
object during debug it really contains image urls and text strings but
how do I reach them? I read ImageGetter and getSpans on SDK but there
is no example on how to use them. Would you please help me?


Spanned How to use?

by Dianne Hackborn » Wed, 11 Mar 2009 05:40:04 GMT

 This function is intended to create text with style spans that you can put
into a TextView for display.  Unfortunately the underlying style span stuff
is not extensively documented, though it shouldn't be hard to figure out --
look at the various classes in for the kinds of standard
style spans that are in the platform.  You may also want to browse the
open-source code to see how they are used.

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.


Sponsored Links

Spanned How to use?

by John Doe » Wed, 11 Mar 2009 19:57:56 GMT

 I am really trying hard to figure it out :( Probably it has a very
easy way to implement but I couldnt discover.

Spanned spanned;
spanned =  Html.fromHtml(content);

I am looking inside spanned and I see that all image url's and text is
properly kept. There must be a way to reach them. Can you help me to
figure it out? Can anyone?


Spanned How to use?

by Dianne Hackborn » Thu, 12 Mar 2009 02:16:39 GMT

 What are you trying to do?  Like I said, the main purpose of this API is to
create styled text that can be given to TextView for display.  If you want
to do your own display of that stuff, you'll need to write your own text
layout engine line TextView (or using the existing layout stuff like it
already does).

You'll really need to dig in to the code of TextView and these classes if
you want to do your own special stuff with them.

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.


Spanned How to use?

by John Doe » Thu, 12 Mar 2009 16:06:33 GMT

 ere is what I am trying to do. I am parsing an XML an inside CDDATA
tags inside <content:encoded> tags I have an html

<p> </p>
<p class="MsoNormal"><a href="
uploads/2009/03/ahome.jpg"><img class="alignleft size-thumbnail wp-
image-791" title="ahome" src="
uploads/2009/03/ahome-150x150.jpg" alt="ahome" width="150"
height="150" /></a>Gelitiricileri <a href="
community/"></a> olan amac Androidin
grafiksel arayzn deitirmeye yarayan ve internette birok temas
bulunan ve temalar gelitirilmeye devam eden kullanl bir
program.Size nasl kullanldn aklamaya alacam.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">ncelikle uygulamay bulmak iin android market
atktan sonra men tuuna basarak Search diyelim gelen arama blmne
ahome yazalm,karnza sadaki gibi ahome ait program ve temalar
karnza gelecektir,ahome'un 2 versiyonu mevcut biri cretli olan
biri ise free yani cretsiz olan versiyonu <strong>Ahome Lite </
strong>biz lite olann yklyoruz.Ykleme bittikten sonra program
altrmaynz , size tavsiyem ykledikten sonra cihaznz yeniden
balatrsanz sknt yaamasnz,</p>
<p class="MsoNormal">Yklendikten sonra , Ana ekrandayken Home tuuna
bir kere bastnzda karnza aadaki gibi bir seim ekran
gelecektir,aHome Lite setiimizde masast 2 blm oluyor sa ve
sol olarak.</p>
<p class="MsoNormal"><a href="
uploads/2009/03/ahome2.jpg"><img class="alignnone size-medium wp-
image-792" title="ahome2" src="
content/uploads/2009/03/ahome2-200x300.jpg" alt="ahome2" width="200"
height="300" /> </a><a href="
content/uploads/2009/03/ahome3.jpg"><img class="alignnone size-medium
wp-image-793" title="ahome3" src="
content/uploads/2009/03/ahome3-200x300.jpg" alt="ahome3" width="200"
height="300" /></a></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Aada grnd gibi , hava durumu ve saat
tarih ve gn gsteren bir widget geliyor.Aada soldaki Byte
iareti herzamanki program listemizi ayor, sadaki hz gstergesi
ise kullanlabilecek widgetlar listeliyor, istediginiz widgeti
silebiliyorsunuz yerini deitirebiliyorsunuz.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><a href="
uploads/2009/03/ahome4.jpg"><img class="alignnone size-medium wp-
image-794" title="ahome4" src="
content/uploads/2009/03/ahome4-200x300.jpg" alt="ahome4" width="200"
height="300" /> </a><a href="
content/uploads/2009/03/ahome5.jpg"><img class="alignnone size-medium
wp-image-795" title="ahome5" src="

Other Threads

1. Schedule notification instead of permanently check


I have a service that is running in background. It needs to send
notifications to the user. In my application you can create data with
date and time. The service now can fetch this data and give the user a
notification t-x minutes before the saved time is reached ("remind for

Can I set a fix moment when the service should send the user a
notification instead of listen/check all the time for (approximately)
time identity?

And a secondary question: how can I set "Autostart" for the
applications service?

Thanks a lot!
-Danny S.


2. documentation and samples downloaded but not accessable inside eclipse

I have installed Eclipse Galieo 3.5 which works fine. I have installed
Android 3.0. The Android classes are in the IDE and you can create a
shell application.

However, neither the inline documentation  or sample code is in the
IDE when they are present inside the Android folder structure in
'Program Files'.

How can I get the documentation and samples accessable inside the Eclipse IDE?



3. Create Image from String

4. touch mode for listview, context menu and onListItemClick

5. Utak-atik kabel handsfree

6. Ada yang suka ngesubmit lokasi access point ke Skyhook?

7. Mandriva aapt: /lib/ using latest SDK update