Using layout_gravity=“bottom” to place at bottom of LinearLayout

后端 未结 5 1064
小鲜肉
小鲜肉 2021-01-11 14:50

I would like to place a layout on the bottom of a LinearLayout, but I can\'t seem to get it to work. I know that I can use RelativeLayout to do this, but I should be able to

5条回答
  •  余生分开走
    2021-01-11 15:22

    It could be that, as per https://stackoverflow.com/a/13366783/513038, you need to set the parent LinearLayout to have android:baselineAligned="false". Worked in my case.

提交回复
热议问题