- Mastering Android Development with Kotlin
- Milo? Vasi?
- 65字
- 2021-07-02 15:20:58
Checking out the gravity attribute
View Gravity:
- gravity (direction of the content inside the view): This accepts the following--top, left, right, start, end, center, center_horizontal, center_vertical, and many other
- layout_gravity (direction of the content inside the view parent): This accepts the following--top, left, right, left, start, end, center, center_horizontal, center_vertical, and many others
It's possible to combine values for gravity as follows:
android:gravity="top|center_horizontal"
推薦閱讀