ViewGroup.LayoutParams 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | 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>
本頁部分內容為基於 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
參數
- transfer
- JniHandleOwnership
JniHandleOwnershipA 指示如何處理javaReference
備註
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。