我知道我们可以设置下面的值到 安卓重力
和 安卓layout_gravity
I know we can set the following value to the android:gravity
and android:layout_gravity
.
不过,我很困惑就这两个。
But I am confused regarding both of these.
的使用之间的区别是什么安卓重力
和安卓?layout_gravity
What is the difference between the usage of android:gravity
and android:layout_gravity
?
他们的名字应该可以帮助你:
Their names should help you:
安卓重力
设置查看
其使用上的内容的严重性。
安卓layout_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.
和一个例子是here.