How to layout view right aligned and bottom of an LinearLayout

前端 未结 3 2362
离开以前
离开以前 2021-02-20 16:13

I am trying to layout 1 textview (upText) left aligned and 1 textview (downText) and an image view (image) both on the same line and right aligned.

how can I do that? I

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-20 16:29

    Don't use a LinearLayout. Use a RelativeLayout, with

    • your first TextView set with android:layout_alignParentLeft="true"
    • your second TextView set with android:layout_alignParentBottom="true" and android:layout_alignParentRight="true"
    • something similar for your ImageView, which presently looks like it is going to overlap the second TextView

提交回复
热议问题