I don't have any coding question or something, I had this application that populates (from a webservice) a gridlayoutmanager recyclerview of 2 rows and now the client wants it to be a List. I just want to ask which is better for the performance setting the number of rows of the gridlayoutmanager to 1, or switching to LinearLayoutmanager. regards,
Asked
Active
Viewed 2,911 times
-1
-
No need to use GridLayoutManager if you have 1 column. – Batuhan Coşkun Aug 26 '16 at 07:36
-
yeah i know i switched to linearlayout. – eshteghel company Aug 26 '16 at 07:42
2 Answers
1
LinearLayoutManager :
- LinearLayoutManager is similar to old ListView concept.
- it's fully occupy the row they not bother but each item Text size or image width height etc.
GridLayoutManager :
Using GirdLayoutManager you can split each row more than one item.
You can add 3 in row or 4 row or etc but each row each item width and height are same like below,
Grid View shows symmetric items in view.
Using GridLayoutManager you can also done alternative row count like odd row's are 2 items and even row's 4 items by using setSpanSizeLookup.
Finally myself main difference using GridLayoutManager you done better and innovative UI in Android.

Magesh Pandian
- 8,789
- 12
- 45
- 60
0
it's more elegant using LinearLayoutManager
if you have one row, but for performance it's same.

Palak
- 2,165
- 2
- 21
- 31

an_droid_dev
- 1,136
- 14
- 18