android中的垂直居中跟水平居中 (转) 如果 想让一个按钮在它的容器中居中的话 就设置这个按钮的属性: 垂直居中: android:layout_centerVertical="true" 水平居中: android:layout_centerHorizontal="true"