• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to add images to StringBuffer in android?

nivie

Newbie
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.
 
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.
 
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?
 
How about transforming the XML into HTML or constructing HTML from the XML, and displaying it using android.webkit.WebView?
 
Back
Top Bottom