开发者

How to set item centered horizontally and vertically in android?

开发者 https://www.devze.com 2023-01-28 21:02 出处:网络
how can i how can I make it centered verrically and horizontally at the same time? android:gravity=\"center_horizontal\"

how can i how can I make it centered verrically and horizontally at the same time?

android:gravity="center_horizontal"
开发者_如何学JAVA


Try this, set android:layout_gravity="center"

https://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html#attr_android:layout_gravity

0

精彩评论

暂无评论...
验证码 换一张
取 消