Język

AppWidgetHost.CreateView(Context, Int32, AppWidgetProviderInfo) Method

Definition

Create the AppWidgetHostView for the given widget.

[Android.Runtime.Register("createView", "(Landroid/content/Context;ILandroid/appwidget/AppWidgetProviderInfo;)Landroid/appwidget/AppWidgetHostView;", "")]
public Android.Appwidget.AppWidgetHostView? CreateView(Android.Content.Context? context, int appWidgetId, Android.Appwidget.AppWidgetProviderInfo? appWidget);
[<Android.Runtime.Register("createView", "(Landroid/content/Context;ILandroid/appwidget/AppWidgetProviderInfo;)Landroid/appwidget/AppWidgetHostView;", "")>]
member this.CreateView : Android.Content.Context * int * Android.Appwidget.AppWidgetProviderInfo -> Android.Appwidget.AppWidgetHostView

Parameters

context
Context

The context used to create the widget's host view.

appWidgetId
Int32

The ID of the app widget to display in the host view.

appWidget
AppWidgetProviderInfo

The provider information for the app widget.

Returns

The new host view, which this host retains to receive widget updates, or null if the app widget service is unavailable.

Attributes

Remarks

Create the AppWidgetHostView for the given widget. The AppWidgetHost retains a pointer to the newly-created View.

Java documentation for android.appwidget.AppWidgetHost.createView(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