求android高手
layout_gravity也garvity的区别??
谢谢
------解决方案--------------------
你可以这样看,layout_gravity是指控件的布局位置,比如Button、ImageView等。而gravity貌似是指控件中的文字、图片等得位置吧。比如Button上的文字。
------解决方案--------------------
android:gravity是对元素本身 //Specifies how to place the content of an object, both on the x- and y-axis, within the object itself.
http://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html#gravity
android:layout_gravity是相对与它的父元素//Standard gravity constant that a child can supply to its parent.
http://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html#attr_android:layout_gravity
------解决方案--------------------
------解决方案--------------------