Activity.OnCreateView 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| OnCreateView(View, String, Context, IAttributeSet) |
標準實作
|
| OnCreateView(String, Context, IAttributeSet) |
標準實作 |
OnCreateView(View, String, Context, IAttributeSet)
標準實作
android.view.LayoutInflater.Factory2#onCreateView(View, String, Context, AttributeSet)充氣時使用 LayoutInflater 返回。#getSystemService
[Android.Runtime.Register("onCreateView", "(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;", "GetOnCreateView_Landroid_view_View_Ljava_lang_String_Landroid_content_Context_Landroid_util_AttributeSet_Handler")]
public virtual Android.Views.View? OnCreateView(Android.Views.View? parent, string name, Android.Content.Context context, Android.Util.IAttributeSet attrs);
[<Android.Runtime.Register("onCreateView", "(Landroid/view/View;Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;", "GetOnCreateView_Landroid_view_View_Ljava_lang_String_Landroid_content_Context_Landroid_util_AttributeSet_Handler")>]
abstract member OnCreateView : Android.Views.View * string * Android.Content.Context * Android.Util.IAttributeSet -> Android.Views.View
override this.OnCreateView : Android.Views.View * string * Android.Content.Context * Android.Util.IAttributeSet -> Android.Views.View
參數
- parent
- View
視圖:此值可能是零值。
- name
- String
字串:此值不可能為空值。
- context
- Context
背景說明:此值不可能是零值。
- attrs
- IAttributeSet
AttributeSet:此值不能為空值。
傳回
這個值可能是 Null。
實作
- 屬性
備註
標準實作 android.view.LayoutInflater.Factory2.onCreateView(View,String,Context,AttributeSet),在膨脹時使用 Context.getSystemService(Class) 回傳的 LayoutInflater 。 此實作處理標籤,將片段嵌入活動中。
另請參閱:
Android 參考資料。android.app.Activity.onCreateView
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
OnCreateView(String, Context, IAttributeSet)
標準實作 android.view.LayoutInflater.Factory#onCreateView 在充氣時使用 LayoutInflater 返回 #getSystemService。
[Android.Runtime.Register("onCreateView", "(Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;", "GetOnCreateView_Ljava_lang_String_Landroid_content_Context_Landroid_util_AttributeSet_Handler")]
public virtual Android.Views.View? OnCreateView(string name, Android.Content.Context context, Android.Util.IAttributeSet attrs);
[<Android.Runtime.Register("onCreateView", "(Ljava/lang/String;Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;", "GetOnCreateView_Ljava_lang_String_Landroid_content_Context_Landroid_util_AttributeSet_Handler")>]
abstract member OnCreateView : string * Android.Content.Context * Android.Util.IAttributeSet -> Android.Views.View
override this.OnCreateView : string * Android.Content.Context * Android.Util.IAttributeSet -> Android.Views.View
參數
- name
- String
字串:此值不可能為空值。
- context
- Context
背景說明:此值不可能是零值。
- attrs
- IAttributeSet
AttributeSet:此值不能為空值。
傳回
這個值可能是 Null。
實作
- 屬性
備註
LayoutInflater.Factory.onCreateView(String, Context, AttributeSet)的標準實作,該功能在膨脹時使用,LayoutInflater 由 Context.getSystemService(Class) 回傳。 這個實作沒有任何作用,是用於預Build.VERSION_CODES。蜂巢應用程式。 較新的應用程式應該使用 onCreateView(View, String, Context, AttributeSet)。
另請參閱:
Android 參考資料。android.app.Activity.onCreateView
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。