Question

I am kinda new to Android. If I want to list items in one column, each item is an image + two text-views below it.

Should I use a list-view or a grid-view?

Was it helpful?

Solution

Unless you have plans to make it multicolumn on bigger screen you should use ListView for tasks like that. Besides, it is very easy to switch to GridView in future should you need that.

You just create your image and two rows of text as a list item, similar to what described in this article.

OTHER TIPS

If a column is then better to use ListView. For more than one column is best GridView. How you want to display an image with two TextViews on each item in the ListView then you need to create a custom layout for the ListView item. This is enough for you.

You should use list view for it.

A list view gets populated with it contents using an adapter. Few adapters come inbuilt with the APIs but for adding an image and two text views, you'll need a custom adapter. Here's a tutorial on Custom ListView by Android Hive

Also, I've made my own adapter in this app, you can refer to it to make your own.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top