0

I have a GridView in which I need to show images. I have applied below logic:

If 1 Photo : 1 row and 1 col and full width image.
If 2 Photos : 1 row and 2 cols with equal width of both images (half of screen width)
If 3 photos: 2 rows. 1st row will be having 1 col (1 image with full width)
and 2nd row will be having 2 images with equal width (half of screen width)

If 4 or more photos : width will be half for each column.

I have managed for the rest cases, the only problem is to set for case 3 when I am having 3 photos. I want 1 full width photo in 2 row ans 2 equal half width photos in 2nd row but my code giving me 2 half equal width photos in 1st row and 1 half width photo in 2nd row.

I need to use Gridview only, please tell me if this can be possible using Gridview.

Please help me if you have any idea here.

Thank you so much.

I want to have below layout:

enter image description here

Prithniraj Nicyone
  • 5,021
  • 13
  • 52
  • 78

0 Answers0