user971741
user971741

Reputation:

How to create boxes with text and images inside them

I want to create an UI similar to the one shown in the image.

It will basically have to a scrollable layout with set of boxes overlaying in relative layout over a map fragment each containing text as well images.

These boxes will be created dynamically (extracting from Twitter) and keep appearing and when increased in length the layout will become scrollable

I am done with setting the layout and the map, where I am stuck is I have no idea which items can be added and styled in this way providing such functionality.

If it would have been a web page I would use div for boxes and then TextViews and ImageViews for texts and images respectively but what is the div in android UI?

What I have searched so far I thnk ListView is the closest possible but I am not sure yet, so my questions are:

enter image description here

Upvotes: 0

Views: 61

Answers (1)

codeMagic
codeMagic

Reputation: 44571

Is it possible through ListView?

Yes, ListView is most likely what you want using a CustomAdapter and create a separate layout to inflate in the Adapter's getView() method. You can create the layout however you want using TextViews, ImageViews, etc...

Are there any other ways through which this can be done?

There always is but if you want something with a list then ListView would probably be most appropriate.

ListView tutorial

ListView Docs

Upvotes: 1

Related Questions