How to align linearlayout to vertical center?

后端 未结 8 1782
你的背包
你的背包 2020-12-08 12:43

I\'m trying to align LinearLayout\'s vertical center which shows following pic (skycolor border) to delete button\'s vertical center.

so I set the gravity of id:grou

8条回答
  •  生来不讨喜
    2020-12-08 13:32

    use android:layout_gravity instead of android:gravity

    android:gravity sets the gravity of the content of the View its used on. android:layout_gravity sets the gravity of the View or Layout in its parent.

提交回复
热议问题