One of the features in LinearLayout in Android is a property called Weight , which application can specify using android:layout_weight . This attribute assigns importance to the view in terms of how much space it should occupy on the screen.
RelativeLayout , on the other hand, does not support weight or, in other words, RelativeLayout does not pay attention to android:layout_weight . This is a property of LinearLayout.LayoutParams , but not RelativeLayout.LayoutParams .
AADProgramming
source share