Specify the image size for changing the screen size as a percentage of the screen

On Android, I need a simple layout to be developed using an XML layout (rather than programming):

I need to have the following:

1- small view of the image on the left (in the center vertically)

2- Three kinds of images are slightly larger next to each other (also in the center)

3- A small view of the image on the right side (in the center vertically)

therefore, 5 images are adjacent horizontally and vertically in the center.

It’s simple, anyway the question is how to specify the types of images for resizing as a percentage of the height of the screen?

So, if I point out three image elements at 60% of the screen height, I expect the View image to resize (including the original image) to 60% of the screen height.

Is it possible?

thanks

+4
source share
1 answer

Yes it is: Take LinearLayout (Horizontal) and then to all the children (Imageviews here) give layout:height="0dp" and layout:weight=".6" , try this first and update the questions if you have more

+2
source

All Articles