0

Whoever answers this gets a cookie.

My aim is to have a 2 dimensional ListView.

A ListView containing a number of HorizontalListViews (courtesy of Cheesebaron & co.)

Problem is:

HorizontalListView does not resolve its own Height when match_parent/wrap_content is used. Though the Width is.

When explicitly giving a Height each HorizontalListView shows fine.

I have tried to resolve the Height myself inside HorizontalListView.OnMeasure which receives HeightMeasureSpec of zero/Unpecified but I failed.

I have made the project public on Bitbucket

Please help. Sorry if my writing is confusing.

Thanks.

(Remember the cookie)

  • I had hoped the nice note in the GitHub repository would scare you away from using the horrible HorizontalListView implementation I made more than 3 years ago. I think the problem lies with the HorizontalListView since it does not implement OnMeasure and probably does not tell Android how to measure itself. – Cheesebaron Mar 09 '16 at 08:50
  • ok thanks. I saw but thought I would try anyhow. Do you have any other layout recommendation for what I am trying to achieve? – Alex Robęrts Mar 10 '16 at 09:21
  • http://androidconceptspp.blogspot.com/2015/02/create-horizontal-listview-using.html This seems like a nice and simple approach – Cheesebaron Mar 11 '16 at 15:41

0 Answers0