ActionBar.LayoutParams Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| ActionBar.LayoutParams(ActionBar+LayoutParams) |
Copies layout parameters and action-bar gravity from another instance. |
| ActionBar.LayoutParams(GravityFlags) |
Initializes wrap-content width, match-parent height, and the supplied gravity. |
| ActionBar.LayoutParams(ViewGroup+LayoutParams) |
Copies general view-group layout parameters, leaving action-bar gravity at its default. |
| ActionBar.LayoutParams(Context, IAttributeSet) |
Loads layout dimensions, margins, and action-bar gravity from the attribute set. |
| ActionBar.LayoutParams(Int32, Int32) |
Initializes the supplied dimensions with start-aligned, vertically centered gravity. |
| ActionBar.LayoutParams(IntPtr, JniHandleOwnership) |
Initializes a managed representation of an existing Java Native Interface object. |
| ActionBar.LayoutParams(Int32, Int32, GravityFlags) |
Content and code samples on this page are subject to the licenses described in the Content License. |
ActionBar.LayoutParams(ActionBar+LayoutParams)
Copies layout parameters and action-bar gravity from another instance.
[Android.Runtime.Register(".ctor", "(Landroid/app/ActionBar$LayoutParams;)V", "")]
public LayoutParams(Android.App.ActionBar.LayoutParams? source);
[<Android.Runtime.Register(".ctor", "(Landroid/app/ActionBar$LayoutParams;)V", "")>]
new Android.App.ActionBar.LayoutParams : Android.App.ActionBar.LayoutParams -> Android.App.ActionBar.LayoutParams
Parameters
- source
- ActionBar.LayoutParams
ActionBar.LayoutParams
- Attributes
Remarks
Android reference for android.app.ActionBar.LayoutParams.LayoutParams.
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
ActionBar.LayoutParams(GravityFlags)
Initializes wrap-content width, match-parent height, and the supplied gravity.
[Android.Runtime.Register(".ctor", "(I)V", "")]
public LayoutParams(Android.Views.GravityFlags gravity);
[<Android.Runtime.Register(".ctor", "(I)V", "")>]
new Android.App.ActionBar.LayoutParams : Android.Views.GravityFlags -> Android.App.ActionBar.LayoutParams
Parameters
- gravity
- GravityFlags
int
- Attributes
Remarks
Android reference for android.app.ActionBar.LayoutParams.LayoutParams.
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
ActionBar.LayoutParams(ViewGroup+LayoutParams)
Copies general view-group layout parameters, leaving action-bar gravity at its default.
[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.App.ActionBar.LayoutParams : Android.Views.ViewGroup.LayoutParams -> Android.App.ActionBar.LayoutParams
Parameters
- source
- ViewGroup.LayoutParams
ViewGroup.LayoutParams
- Attributes
Remarks
Android reference for android.app.ActionBar.LayoutParams.LayoutParams.
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
ActionBar.LayoutParams(Context, IAttributeSet)
Loads layout dimensions, margins, and action-bar gravity from the attribute set.
[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.App.ActionBar.LayoutParams : Android.Content.Context * Android.Util.IAttributeSet -> Android.App.ActionBar.LayoutParams
Parameters
- c
- Context
Context: This value cannot be null.
- attrs
- IAttributeSet
AttributeSet
- Attributes
Remarks
Android reference for android.app.ActionBar.LayoutParams.LayoutParams.
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
ActionBar.LayoutParams(Int32, Int32)
Initializes the supplied dimensions with start-aligned, vertically centered gravity.
[Android.Runtime.Register(".ctor", "(II)V", "")]
public LayoutParams(int width, int height);
[<Android.Runtime.Register(".ctor", "(II)V", "")>]
new Android.App.ActionBar.LayoutParams : int * int -> Android.App.ActionBar.LayoutParams
Parameters
- width
- Int32
int
- height
- Int32
int
- Attributes
Remarks
Android reference for android.app.ActionBar.LayoutParams.LayoutParams.
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
ActionBar.LayoutParams(IntPtr, JniHandleOwnership)
Initializes a managed representation of an existing Java Native Interface object.
protected LayoutParams(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.ActionBar.LayoutParams : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.ActionBar.LayoutParams
Parameters
- javaReference
-
IntPtr
nativeint
The Java Native Interface object reference.
- transfer
- JniHandleOwnership
The ownership transfer to apply to the Java Native Interface object reference.
Remarks
This constructor is called by the .NET for Android binding runtime when it creates a managed peer for an existing Java object.
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
ActionBar.LayoutParams(Int32, Int32, GravityFlags)
Content and code samples on this page are subject to the licenses described in the Content License.
[Android.Runtime.Register(".ctor", "(III)V", "")]
public LayoutParams(int width, int height, Android.Views.GravityFlags gravity);
[<Android.Runtime.Register(".ctor", "(III)V", "")>]
new Android.App.ActionBar.LayoutParams : int * int * Android.Views.GravityFlags -> Android.App.ActionBar.LayoutParams
Parameters
- width
- Int32
int
- height
- Int32
int
- gravity
- GravityFlags
int
- Attributes
Remarks
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-08-03 UTC.
Android reference for android.app.ActionBar.LayoutParams.LayoutParams.
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.