Tiles layout (bin packing)
<p>Situation:
I have set of images. Each image has some level of priority. I want them to be distributed like this:</p>

<p><a href="http://appstouse.com/wp-content/uploads/2011/10/Grid-Size-File-Manager-Android12.png" rel="nofollow">http://appstouse.com/wp-content/uploads/2011/10/Grid-Size-File-Manager-Android12.png</a></p>

<p>or like this: <a href="http://caitsplate.me/wp-content/uploads/2012/04/PhotoGrid_1334763975360-11.jpeg" rel="nofollow">http://caitsplate.me/wp-content/uploads/2012/04/PhotoGrid_1334763975360-11.jpeg</a></p>

<p>Although, I'm not limited by screen height (can be scroll-able), and I don't really have specific sizes for images. The only condition is that images with higher priority must be displayed higher and be bigger than images with lower priority.</p>

<p>Is there any library/layout that can help me distribute images like this? Or maybe some algorithm?</p>
