Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development > Developer 101

Developer 101 101 Tutorials



Reply
 
LinkBack Thread Tools
Old November 17th, 2011, 12:42 AM   #1 (permalink)
New Member
 
Join Date: Nov 2011
Posts: 10
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to add images to StringBuffer in android?

String attr = xpp.getAttributeValue(0);
Drawable drawable = LoadImageFromWebOperations(attr);
stringBuffer.append(drawable);

I don't want to use imageview. It is appending string value to string buffer.
Can anyone tell me how to do append images directly to string buffer?
Thanks in advance.

nivie is offline  
Reply With Quote
Sponsors
Old November 17th, 2011, 12:54 AM   #2 (permalink)
Premium Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
 
Device(s): Galaxy Nexus GSM
Thanks: 2
Thanked 37 Times in 33 Posts
Default

That doesn't make any sense. A string a sequence of characters. It doesn't make sense to be able to append a Drawable to the end of string.

Can you tell us more about what you're actually trying to do? Then perhaps we can give you a reasonable solution.
jiminaus is offline  
Reply With Quote
Old November 17th, 2011, 01:13 AM   #3 (permalink)
New Member
 
Join Date: Nov 2011
Posts: 10
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jiminaus View Post
That doesn't make any sense. A string a sequence of characters. It doesn't make sense to be able to append a Drawable to the end of string.

Can you tell us more about what you're actually trying to do? Then perhaps we can give you a reasonable solution.
I am parsing a XML file and whenever it comes across an image link it downloads and displays it directly on the application. For displaying text values I am using string buffer. Here, Assume we don't know when we need to display the image.
I am new to android.
Can't we create a something like a blank frame and put whatever we want (image or a text) to that frame.

Can you suggest me something for this?
nivie is offline  
Reply With Quote
Old November 17th, 2011, 03:55 AM   #4 (permalink)
Premium Member
 
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
 
Device(s): Galaxy Nexus GSM
Thanks: 2
Thanked 37 Times in 33 Posts
Default

How about transforming the XML into HTML or constructing HTML from the XML, and displaying it using android.webkit.WebView?
jiminaus is offline  
Reply With Quote
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development > Developer 101 User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 08:16 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo