i want to equally spaced four images using constraint layout...i have used guidelines but it is giving me a lot of space between the images and right corner images are going
Not sure about your exact requirement from question, but I can see that you need to display 4 squares with equal width & height across devices.
You don't need to use guideline for both vertical and horizontal but instead to distribute it vertically you can use barrier to align them properly.
Check out code below:
Output:
(This will be consistent across different screen sizes)
Here, vertical guideline is used to distribute views evenly on horizontal direction while barrier is used to align two views in vertical direction.
Dimension ratio is used to make square consistent with 0dp
as height & width.
Edit: O.P. seeks for solution on arranging entire view hierarchy with square boxes at bottom, given below is complete code: