Titanium: How to to display text and images together inline in a tableview?

Mark picture Mark · Jul 31, 2011 · Viewed 7.3k times · Source

What I have is an XML feed of data that are basicly like facebook wall posts.

The posts themselves contain text with interspersed images and video links. Now I can parse (using regex) all the links without a problem.

MY question is what is the best way to display this to the user?

Right now I created a tableview and have each row in the table view display a post. It looks great but the images dont display, they are just raw links to an image URL.

Someone suggested to try a webview, and I placed the webview inside of the tableviewrow, but im getting mixed results as for some reason all the webviews (about 20 tableviewrows/webviews) overrun and overlap each other.

Is there a better strategy to display this data in an organized top down way?

Thanks!!

Answer

Aaron Saunders picture Aaron Saunders · Jul 31, 2011

putting webviews in a table row is a recipe for disaster.

you need to just add each element to the row view and do the appropriate layout.

take a look here if you are on iOS

corrections to "Using TableViews" from appcelerator wiki to make it work on iOS

or here if on Android