title: Dynamic Image grid arrangement in Android
body: <p>I'm working on an app that receives random amount of images and should show them to the user in a grid. Grid cells depends on the amount of Images.  Max is 5. Something like what Facebook does:
  <a href="https://i.stack.imgur.com/0kkz7.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0kkz7.jpg" alt="Facebook Timeline"></a></p>
  
  <p>Notice how the grid changes based on the image dimensions but still in a fixed image space. I tried using staggered grid but it just creates a long list and I'm not exactly good at staggered grid layout myself. Another option is to use grid view but I couldn't programmatically change the dimensions of the grid cells. Any help would be appreciated </p>
  
  <p>I should Mention I'm using Xamarin.Android</p>