Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android table with more than one column like iOS collectionView

is there a custom UI element on android that will behave like iOS collection view? [like a grid view, that is scrollable] or do I have to make a custom table layout custom cells that behave like columns?

here a shot of a UICollectionView for iOS uiCollection View

is there an example for this?

thanks!

like image 895
manuelBetancurt Avatar asked Sep 06 '13 03:09

manuelBetancurt


3 Answers

Since the previous answer does not reflect performance issues, such as it does not use recycling (which is important for long lists), here is what you are probably looking for:

GridView if your building blocks are all equal in size http://developer.android.com/guide/topics/ui/layout/gridview.html

or ListView (and a lot of custom logic) if your building blocks have different sizes/widths http://developer.android.com/guide/topics/ui/layout/listview.html

like image 180
maddrag0n Avatar answered Nov 05 '22 23:11

maddrag0n


I don't know the collection view in iOS, but I guess TableLayout is what you are looking for.

https://developer.android.com/reference/android/widget/TableLayout.html

In API14+ there is GridLayout as well.

https://developer.android.com/reference/android/widget/GridLayout.html

like image 36
flx Avatar answered Nov 05 '22 23:11

flx


Gridview is best replacement of Collection View of IOS. following URL will solve your problem.

http://developer.android.com/guide/topics/ui/layout/gridview.html

like image 3
user1398739 Avatar answered Nov 05 '22 23:11

user1398739