

If however I set the image height to e.g. as if I had set it to wrap_content, too). However, the image will instead be only ever as tall as its bitmap resource (as if I had set it to wrap_content) and the whole list item will be of the same height (i.e. 200dip and the ImageView to fill_parent, I would have expected the ImageView to grow until it hits the 200dip limit set by its parent. When I set the LinearLayout height to e.g. By enabling it (View.VISIBLE), the list item grows in height (or at least it's supposed to).Įven though I declare the item's root layout to wrap_content, and each component in the item to fill_parent, the view I hide/show which is supposed to change the item's height is simply cut off at the bottom instead of its parent (the item layout) growing in height to fully display it.Īre there any gotchas related to ListViews and item layouts and item height which I may have missed?įor testing purposes I have now reduced the list item layout to just contain the root LinearLayout and an ImageView. Under certain conditions, I need to display an additional view in a list item, which is hidden by default (View.GONE). I have a rather complex ListView, with variable list item heights.
