How to align LinearLayout at the center of its parent?

前端 未结 14 2035
北荒
北荒 2020-12-04 09:29

I\'ve looked through numerous similar questions here at SO, but nothing helps. I have a hierarchy of different nested layouts, all have android:layout_width=\"fill_par

14条回答
  •  暖寄归人
    2020-12-04 10:14

    add layout_gravity="center" or "center_horizontal" to the parent layout.

    On a side note, your LinearLayout inside your TableRow seems un-necessary, as a TableRow is already an horizontal LinearLayout.

提交回复
热议问题