語言

ViewGroup.LayoutParams 建構函式

定義

多載

名稱 Description
ViewGroup.LayoutParams(ViewGroup+LayoutParams)

複製建構函式。

ViewGroup.LayoutParams(Context, IAttributeSet)

建立一組新的版面參數。

ViewGroup.LayoutParams(Int32, Int32)

建立一組新的版面參數,並設定指定的寬度與高度。

ViewGroup.LayoutParams(IntPtr, JniHandleOwnership)

用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。

ViewGroup.LayoutParams(ViewGroup+LayoutParams)

複製建構函式。

[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

參數

source
ViewGroup.LayoutParams

Android.Views.ViewGroup+LayoutParams 的原始碼值。

屬性

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

ViewGroup.LayoutParams(Context, IAttributeSet)

建立一組新的版面參數。

[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

參數

c
Context

應用程式環境

attrs
IAttributeSet

從中提取版面參數值的屬性集合

屬性

備註

建立一組新的版面參數。 這些值是從所提供的屬性集合和上下文中提取出來的。 映射到這組版面參數的 XML 屬性如下:

<ul><li>layout_width:寬度,可以是精確值,#WRAP_CONTENT#FILL_PARENT(在 API Level 8 中被#MATCH_PARENT替換)</li><>layout_height:高度,可以是精確值,#WRAP_CONTENT#FILL_PARENT(在 API 層級 8#MATCH_PARENT 中被<替換為)/li></ul>

Java 文件 android.view.ViewGroup.LayoutParams.LayoutParams(android.content.Context, android.util.AttributeSet)

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

ViewGroup.LayoutParams(Int32, Int32)

建立一組新的版面參數,並設定指定的寬度與高度。

[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

參數

width
Int32

寬度,要麼 #WRAP_CONTENT是 , #FILL_PARENT (在 API Level 8 中被 #MATCH_PARENT 取代),要麼是固定的像素大小

height
Int32

高度,要麼 #WRAP_CONTENT是 , #FILL_PARENT (在 API Level 8 中被 #MATCH_PARENT 取代),或是固定的像素大小

屬性

備註

建立一組新的版面參數,並設定指定的寬度與高度。

Java 文件 android.view.ViewGroup.LayoutParams.LayoutParams(int, int)

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

ViewGroup.LayoutParams(IntPtr, JniHandleOwnership)

用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。

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

參數

javaReference
IntPtr

nativeint

IntPtrA 包含一個 Java 原生介面(JNI)物件參考。

transfer
JniHandleOwnership

JniHandleOwnershipA 指示如何處理javaReference

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於