What I want to make with Android layout looks like this :
I thought out several options. (Total lenth of list is about 80 rows.)
- ListView which has TextView and GridView (I tried, but GridView didn't stretched to right size.)
- ExpandableList/GridView from https://stackoverflow.com/a/4536955/358813
- ScrollView which has a LinearLayout which has TextView and GridView.
- Calculate GridView height using its array source and set LayoutParams.
ExpandableGridView looks good, but there is a comment under a similar question. My app uses pretty much bitmaps, so I'm worried about the comment :
this solution is not memory efficient and the app will crash if the cells are images.
And ExpandableListView is using hack. It's not a big problem, but it makes me not comfortable.
Calculating height seems to work, but I didn't try. I should solve this problem by this way?
Is there any solution not using hack(or being able to recyle view)? I'm familiar with HTML&CSS, so I can't understand why this stuff is not easy.. At first I thought that this is not so difficult because it looks similiar with ExpandableListView.