I've got a header and a main body to fit in a screen markup in android studio. Assuming…
Jump to turn (12)
- 1I've got a header and a main body to fit in a screen markup in android studio. A
- 2What if header's dimensions are hard set? I only need the body to stretch vertic
- 3How can I check the final distance between the elements of my markup code?
- 4Is padding cumulative? if I have horizontal and right both at 6dp, does that mak
- 5Are paddings cumulative if they are included in different elements? For example
- 6Is there some external program or site that will tell me what is the distance be
- 7Help me find layout boundaries. The only eye icon i can find in my currently ope
- 8Design tab doesn't offer any measurements, all I can see is the final look and t
- 9If I copy the code here will you be able to tell me the distance between the mar
- 10(empty prompt)
- 11Is there any way I can add 2 layers of padding? I want my header to have padding
- 12What will be the distance between the left screen border and the first element?
- User
I've got a header and a main body to fit in a screen markup in android studio. Assuming they are in their separate LinearLayouts, how do I make the body to take all the vertical space that isn't taken by the header?
- Assistant
You can achieve this by using
LinearLayoutwith vertical orientation for your parent layout, and within it, you can set thelayout_heightattribute to on both the header and the body LinearLayouts, and then set the attribute of the body LinearLayout to . This will allow the body to take up all the vertical space available after the header.