Android RelativeLayout — how to position?

后端 未结 3 1268
旧时难觅i
旧时难觅i 2021-02-14 14:03

I want a Layout like this: \"Desired

But my code doesn\'t work. I can\'t achieve this Layout, and I don\'t

3条回答
  •  春和景丽
    2021-02-14 14:45

    You don't need to use gravity or the inner LinearLayout at all for this. Instead use layout_alignParentTop, layout_alignParentLeft, layout_alignParentRight, layout_alignParentBottom, layout_centerInParent and layout_centerVertical on the children.

    It might be useful for you to go through the RelativeLayout tutorial.

提交回复
热议问题