How to align LinearLayout at the center of its parent?

前端 未结 14 2027
北荒
北荒 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:10

    The problem is that the root's (the main layout you store the other elements) gravity is not set. If you change it to center the other elements' gravity must work just fine.

提交回复
热议问题