In addition to the accepted answer:
I had a similar problem when I needed multiple images in a grid with the same column widths, so I used a table layout. It worked, but as the images load asynchronously, the corresponding columns occupy the entire width until all the columns have at least one image.
I solved this with Robby Pond's solution, but it did not work for the last row, which did not necessarily have as many images as the other rows, stretching these images to cover all the free space when I wanted them to be inserted into the same columns, as above. To combat this, I populated the remaining empty columns of this row with regular View objects,
using the same layout options as all other images:
width = 0, weight = 1. And that solved!
may5694 Jul 27 '12 at 17:22 2012-07-27 17:22
source share