LinearLayout.LayoutParams.Weight Property

Definition

Indicates how much of the extra space in the LinearLayout will be allocated to the view associated with these LayoutParams.

[Android.Runtime.Register("weight")]
public float Weight { get; set; }
[<Android.Runtime.Register("weight")>]
member this.Weight : single with get, set

Property Value

Attributes

Remarks

Indicates how much of the extra space in the LinearLayout will be allocated to the view associated with these LayoutParams. Specify 0 if the view should not be stretched. Otherwise the extra pixels will be pro-rated among all views whose weight is greater than 0.

Java documentation for android.widget.LinearLayout.LayoutParams.weight.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to