Images in a GalleryView are being clipped at the top and bottom
I have a GalleryView (set to View.GONE) that is being filled with images that are different shapes and a small variety of different sizes (within a reasonable range, so they can all be scaled the same amount with no problems), which is fine. Then I set it to View.VISIBLE. Unfortunately, the GalleryView will clip the tops and bottoms of every other image in the list to match the size of the shortest item. GalleryView layout_height is set to wrap_contents.
I'd like the GalleryView height to match 开发者_StackOverflow中文版the height of the largest image, not the smallest (noting, also, that this will change based on the dpi of the phone in question). How would I force or encourage this?
Edit: This is kind of an old question, but it's still a problem. However, I have now discovered that it doesn't clip to the shortest item, it clips to the item that is selected at first. So if I initialize the Gallery to be already scrolled to the second item, they'll clip to that one. Unfortunately, I can't seem to determine beforehand which item is the largest and scroll to that (which wouldn't be a great solution anyway).
Edit again: Here's an example image. See how the second item is clipped at the top and bottom?
精彩评论