I would like to layout all my screens on Android so they are compatible with whatever screen size and resolution. So I thought the best would be to use some kind of relative specification using the weight
attribute.
I know how to specify a button's width relative to its parents, however I do not have any idea how to apply this to all aspects of the layout. The logic behind it ideally would look like:
horizontalSize = 100%
verticalSize = 100%
Button1:
20% padding to top <- no idea, how to do this, (only using fixed sizes in relative layout)
10% height <- no idea, how to do this
50% width <- with weight attribute
center horizontally <- with layout_centerHorizontal
Button2:
20% padding to Button1 <- only know relative with use of fixed pixels
5% padding to left
30% width
10% height
Button3:
20% padding to Button1
5% padding to right
30% width
10% height
....
Many thanks!