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

<![CDATA[
<p> </p>
<p class="MsoNormal"><a href="http://www.androidturkiye.net/wp-content/
uploads/2009/03/ahome.jpg"><img class="alignleft size-thumbnail wp-
image-791" title="ahome" src="http://www.androidturkiye.net/wp-content/
uploads/2009/03/ahome-150x150.jpg" alt="ahome" width="150"
height="150" /></a>Geliştiricileri <a href="http://www.mappn.com/
community/">http://www.mappn.com/community/</a> olan amacı Androidin
grafiksel arayüzünü değiştirmeye yarayan ve internette birçok teması
bulunan ve temaları geliştirilmeye devam eden kullanışlı bir
program.Size nasıl kullanıldığını açıklamaya çalışacağım.</p>
<p class="MsoNormal">   </p>
<p class="MsoNormal">Öncelikle uygulamayı bulmak için android market
açtıktan sonra menü tuşuna basarak Search diyelim gelen arama bölümüne
ahome yazalım,karşınıza sağdaki gibi ahome ait program ve temalar
karşınıza gelecektir,ahome'un 2 versiyonu mevcut biri ücretli olan
biri ise free yani ücretsiz olan versiyonu <strong>Ahome Lite </
strong>biz lite olanını yüklüyoruz.Yükleme bittikten sonra programı
çalıştırmayınız , size tavsiyem yükledikten sonra cihazınızı yeniden
başlatırsanız sıkıntı yaşamasınız,</p>
<p class="MsoNormal">Yüklendikten sonra , Ana ekrandayken Home tuşuna
bir kere bastığınızda karşınıza aşağıdaki gibi bir seçim ekranı
gelecektir,aHome Lite ı seçtiğimizde masaüstü 2 bölüm oluyor sağ ve
sol olarak.</p>
<p class="MsoNormal"><a href="http://www.androidturkiye.net/wp-content/
uploads/2009/03/ahome2.jpg"><img class="alignnone size-medium wp-
image-792" title="ahome2" src="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome2-200x300.jpg" alt="ahome2" width="200"
height="300" />          </a><a href="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome3.jpg"><img class="alignnone size-medium
wp-image-793" title="ahome3" src="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome3-200x300.jpg" alt="ahome3" width="200"
height="300" /></a></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Aşağıda göründüğü gibi , hava durumu ve saat
tarih ve günü gösteren bir widget geliyor.Aşağıda soldaki Büyüteç
işareti herzamanki program listemizi açıyor, sağdaki hız göstergesi
ise kullanılabilecek widgetları listeliyor, istediginiz widgeti
silebiliyorsunuz yerini değiştirebiliyorsunuz.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><a href="http://www.androidturkiye.net/wp-content/
uploads/2009/03/ahome4.jpg"><img class="alignnone size-medium wp-
image-794" title="ahome4" src="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome4-200x300.jpg" alt="ahome4" width="200"
height="300" />          </a><a href="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome5.jpg"><img class="alignnone size-medium
wp-image-795" title="ahome5" src="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome5-200x300.jpg" alt="ahome5" width="200"
height="300" /></a></p>
<p class="MsoNormal">Yüklenen temaları değiştirmek için ise menü
tuşuna bastıktan sonra preference kısmına girdikten sonra gelen
menüden yapabiliyorsunuz.</p>
<p class="MsoNormal"> <a href="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome7.jpg"><img class="alignnone size-medium
wp-image-797" title="ahome7" src="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome7-200x300.jpg" alt="ahome7" width="200"
height="300" />          </a><a href="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome8.jpg"><img class="alignnone size-medium
wp-image-799" title="ahome8" src="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome8-200x300.jpg" alt="ahome8" width="200"
height="300" /></a></p>
<p class="MsoNormal">Temayı seçtiğinizde yukarıda Star tema seçildi,
temanın uygulanması 5-6 saniye alıyor.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> <a href="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome9.jpg"><img class="alignnone size-medium
wp-image-801" title="ahome9" src="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome9-200x300.jpg" alt="ahome9" width="200"
height="300" />          </a><a href="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome10.jpg"><img class="alignnone size-medium
wp-image-802" title="ahome10" src="http://www.androidturkiye.net/wp-
content/uploads/2009/03/ahome10-200x300.jpg" alt="ahome10" width="200"
height="300" /></a></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Star themein görünümü yukaridaki gibidir program
ikonlarınızın çoğunu tema olduğu gibi değiştirmektedir. Bunun yanında
hali hazırda iPhoneStyle,Freenil,PinkStar,Star,Blue iPhone gibi
çeşitli temalarda mevcut.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><strong>Kişisel izlenimler:</strong></p>
<p class="MsoNormal">Program androidi alışılmış arayüzünden kurtararak
farklı bir görünüme sokuyor , hava durumu gibi ektra özellikler
ekliyor , star teması biraz olsun sistemi yavaşlatıyor, fakat gördüğüm
kadarı ile temaya göre performans farklılık gösterebilir, ,yeni
geliştirilen ve geliştirilecek olan temalarıda denemek gerekir.Arayüz
değişikliği isteyenler için rahatlıkla kullanılacak bir programdır.</
p>
  ]]>
  </content:encoded>


I am trying to extract images and text from this content. To change
RSS to HTML I hvae used Spannable. it spans perfeclt, finds images and
texts but I dont know how to reach them. Is there any other method to
reach the images and text inside html ?

On Mar 11, 8:16 pm, Dianne Hackborn <[email protected]> wrote:
> 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.
>
>
>
> On Wed, Mar 11, 2009 at 4:57 AM, John Doe <[email protected]> wrote:
>
> > 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?
>
> > On Mar 10, 11:39 pm, Dianne Hackborn <[email protected]> wrote:
> > > 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 android.text.style 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.
>
> > > On Tue, Mar 10, 2009 at 12:21 PM, John Doe <[email protected]> wrote:
>
> > > > 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?
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > [email protected]
>
> > > 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.
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> 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.
--~--~---------~--~----~------------~-------~--~----~
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