Udostępnij za pośrednictwem


AppWidgetHostView.SetAppWidget(Int32, AppWidgetProviderInfo) Method

Definition

Set the AppWidget that will be displayed by this view.

[Android.Runtime.Register("setAppWidget", "(ILandroid/appwidget/AppWidgetProviderInfo;)V", "GetSetAppWidget_ILandroid_appwidget_AppWidgetProviderInfo_Handler")]
public virtual void SetAppWidget (int appWidgetId, Android.Appwidget.AppWidgetProviderInfo? info);
[<Android.Runtime.Register("setAppWidget", "(ILandroid/appwidget/AppWidgetProviderInfo;)V", "GetSetAppWidget_ILandroid_appwidget_AppWidgetProviderInfo_Handler")>]
abstract member SetAppWidget : int * Android.Appwidget.AppWidgetProviderInfo -> unit
override this.SetAppWidget : int * Android.Appwidget.AppWidgetProviderInfo -> unit

Parameters

appWidgetId
Int32
Attributes

Remarks

Set the AppWidget that will be displayed by this view. This method also adds default padding to widgets, as described in #getDefaultPaddingForWidget(Context, ComponentName, Rect) and can be overridden in order to add custom padding.

Java documentation for android.appwidget.AppWidgetHostView.setAppWidget(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