Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am a newbie in android so my apologies if this seems to be a silly question. I want to display data returned from the SQLite database. All of this data is text and I am confused should I use GridView or ListView to display this data. Columns would be around 5 so, until now I feel that I need to use GridView. I shall be very thankful if someone can tell me which one to use with a simple example.
Thanks in advance.
Posted

1 solution

It will of course depend on the length of the values. Personally, I would choose ListView for data that has a quite long text. Show only the important identifier (Name or ID for example)on your ListView and then show the details (values of the other columns) when the user has pressed the list item. As for examples, there are many tutorials out there. Some of them are below.

ListView
http://developer.android.com/guide/topics/ui/layout/listview.html[^]
http://www.vogella.com/articles/AndroidListView/article.html[^]
http://www.learn2crack.com/2013/10/android-custom-listview-images-text-example.html[^]

GridView
http://developer.android.com/guide/topics/ui/layout/gridview.html[^]
http://www.androidhive.info/2012/02/android-gridview-layout-tutorial/[^]
 
Share this answer
 
Comments
Ahsan Mirza 22-Nov-13 19:09pm    
Many thanks for your answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900