Język

AppWidgetHost.OnCreateView(Context, Int32, AppWidgetProviderInfo) Method

Definition

Called to create the AppWidgetHostView.

[Android.Runtime.Register("onCreateView", "(Landroid/content/Context;ILandroid/appwidget/AppWidgetProviderInfo;)Landroid/appwidget/AppWidgetHostView;", "GetOnCreateView_Landroid_content_Context_ILandroid_appwidget_AppWidgetProviderInfo_Handler")]
protected virtual Android.Appwidget.AppWidgetHostView? OnCreateView(Android.Content.Context? context, int appWidgetId, Android.Appwidget.AppWidgetProviderInfo? appWidget);
[<Android.Runtime.Register("onCreateView", "(Landroid/content/Context;ILandroid/appwidget/AppWidgetProviderInfo;)Landroid/appwidget/AppWidgetHostView;", "GetOnCreateView_Landroid_content_Context_ILandroid_appwidget_AppWidgetProviderInfo_Handler")>]
abstract member OnCreateView : Android.Content.Context * int * Android.Appwidget.AppWidgetProviderInfo -> Android.Appwidget.AppWidgetHostView
override this.OnCreateView : Android.Content.Context * int * Android.Appwidget.AppWidgetProviderInfo -> Android.Appwidget.AppWidgetHostView

Parameters

context
Context

The context used to create the host view.

appWidgetId
Int32

The ID of the app widget for which to create a view.

appWidget
AppWidgetProviderInfo

The provider information for the app widget.

Returns

A new host view for the widget. An override can return a custom subclass of AppWidgetHostView.

Attributes

Remarks

Called to create the AppWidgetHostView. Override to return a custom subclass if you need it. {

Java documentation for android.appwidget.AppWidgetHost.onCreateView(android.content.Context, int, android.appwidget.AppWidgetProviderInfo).

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