ViewGroup.LayoutParams Constructors

Definition

Overloads

ViewGroup.LayoutParams(ViewGroup+LayoutParams)

Copy constructor.

ViewGroup.LayoutParams(Context, IAttributeSet)

Creates a new set of layout parameters.

ViewGroup.LayoutParams(Int32, Int32)

Creates a new set of layout parameters with the specified width and height.

ViewGroup.LayoutParams(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

ViewGroup.LayoutParams(ViewGroup+LayoutParams)

Copy constructor.

[Android.Runtime.Register(".ctor", "(Landroid/view/ViewGroup$LayoutParams;)V", "")]
public LayoutParams (Android.Views.ViewGroup.LayoutParams source);
[<Android.Runtime.Register(".ctor", "(Landroid/view/ViewGroup$LayoutParams;)V", "")>]
new Android.Views.ViewGroup.LayoutParams : Android.Views.ViewGroup.LayoutParams -> Android.Views.ViewGroup.LayoutParams

Parameters

Attributes

Remarks

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

ViewGroup.LayoutParams(Context, IAttributeSet)

Creates a new set of layout parameters.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "")]
public LayoutParams (Android.Content.Context c, Android.Util.IAttributeSet attrs);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "")>]
new Android.Views.ViewGroup.LayoutParams : Android.Content.Context * Android.Util.IAttributeSet -> Android.Views.ViewGroup.LayoutParams

Parameters

c
Context

the application environment

attrs
IAttributeSet

the set of attributes from which to extract the layout parameters' values

Attributes

Remarks

Creates a new set of layout parameters. The values are extracted from the supplied attributes set and context. The XML attributes mapped to this set of layout parameters are:

<ul> <li>layout_width: the width, either an exact value, #WRAP_CONTENT, or #FILL_PARENT (replaced by #MATCH_PARENT in API Level 8)</li> <li>layout_height: the height, either an exact value, #WRAP_CONTENT, or #FILL_PARENT (replaced by #MATCH_PARENT in API Level 8)</li> </ul>

Java documentation for android.view.ViewGroup.LayoutParams.ViewGroup$LayoutParams(android.content.Context, android.util.AttributeSet).

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

ViewGroup.LayoutParams(Int32, Int32)

Creates a new set of layout parameters with the specified width and height.

[Android.Runtime.Register(".ctor", "(II)V", "")]
public LayoutParams (int width, int height);
[<Android.Runtime.Register(".ctor", "(II)V", "")>]
new Android.Views.ViewGroup.LayoutParams : int * int -> Android.Views.ViewGroup.LayoutParams

Parameters

width
Int32

the width, either #WRAP_CONTENT, #FILL_PARENT (replaced by #MATCH_PARENT in API Level 8), or a fixed size in pixels

height
Int32

the height, either #WRAP_CONTENT, #FILL_PARENT (replaced by #MATCH_PARENT in API Level 8), or a fixed size in pixels

Attributes

Remarks

Creates a new set of layout parameters with the specified width and height.

Java documentation for android.view.ViewGroup.LayoutParams.ViewGroup$LayoutParams(int, int).

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

ViewGroup.LayoutParams(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected LayoutParams (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Views.ViewGroup.LayoutParams : nativeint * Android.Runtime.JniHandleOwnership -> Android.Views.ViewGroup.LayoutParams

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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