AppWidgetManager.UpdateAppWidget Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
UpdateAppWidget(ComponentName, RemoteViews) |
Set the RemoteViews to use for all AppWidget instances for the supplied AppWidget provider. |
UpdateAppWidget(Int32, RemoteViews) |
Set the RemoteViews to use for the specified appWidgetId. |
UpdateAppWidget(Int32[], RemoteViews) |
Set the RemoteViews to use for the specified appWidgetIds. |
UpdateAppWidget(ComponentName, RemoteViews)
Set the RemoteViews to use for all AppWidget instances for the supplied AppWidget provider.
[Android.Runtime.Register("updateAppWidget", "(Landroid/content/ComponentName;Landroid/widget/RemoteViews;)V", "GetUpdateAppWidget_Landroid_content_ComponentName_Landroid_widget_RemoteViews_Handler")]
public virtual void UpdateAppWidget (Android.Content.ComponentName? provider, Android.Widget.RemoteViews? views);
[<Android.Runtime.Register("updateAppWidget", "(Landroid/content/ComponentName;Landroid/widget/RemoteViews;)V", "GetUpdateAppWidget_Landroid_content_ComponentName_Landroid_widget_RemoteViews_Handler")>]
abstract member UpdateAppWidget : Android.Content.ComponentName * Android.Widget.RemoteViews -> unit
override this.UpdateAppWidget : Android.Content.ComponentName * Android.Widget.RemoteViews -> unit
Parameters
- provider
- ComponentName
The ComponentName
for the android.content.BroadcastReceiver BroadcastReceiver
provider
for your AppWidget.
- views
- RemoteViews
The RemoteViews object to show.
- Attributes
Remarks
Set the RemoteViews to use for all AppWidget instances for the supplied AppWidget provider.
It is okay to call this method both inside an #ACTION_APPWIDGET_UPDATE
broadcast, and outside of the handler. This method will only work when called from the uid that owns the AppWidget provider.
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
UpdateAppWidget(Int32, RemoteViews)
Set the RemoteViews to use for the specified appWidgetId.
[Android.Runtime.Register("updateAppWidget", "(ILandroid/widget/RemoteViews;)V", "GetUpdateAppWidget_ILandroid_widget_RemoteViews_Handler")]
public virtual void UpdateAppWidget (int appWidgetId, Android.Widget.RemoteViews? views);
[<Android.Runtime.Register("updateAppWidget", "(ILandroid/widget/RemoteViews;)V", "GetUpdateAppWidget_ILandroid_widget_RemoteViews_Handler")>]
abstract member UpdateAppWidget : int * Android.Widget.RemoteViews -> unit
override this.UpdateAppWidget : int * Android.Widget.RemoteViews -> unit
Parameters
- appWidgetId
- Int32
The AppWidget instance for which to set the RemoteViews.
- views
- RemoteViews
The RemoteViews object to show.
- Attributes
Remarks
Set the RemoteViews to use for the specified appWidgetId.
Note that the RemoteViews parameter will be cached by the AppWidgetService, and hence should contain a complete representation of the widget. For performing partial widget updates, see #partiallyUpdateAppWidget(int, RemoteViews)
.
It is okay to call this method both inside an #ACTION_APPWIDGET_UPDATE
broadcast, and outside of the handler. This method will only work when called from the uid that owns the AppWidget provider.
The total Bitmap memory used by the RemoteViews object cannot exceed that required to fill the screen 1.5 times, ie. (screen width x screen height x 4 x 1.5) bytes.
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
UpdateAppWidget(Int32[], RemoteViews)
Set the RemoteViews to use for the specified appWidgetIds.
[Android.Runtime.Register("updateAppWidget", "([ILandroid/widget/RemoteViews;)V", "GetUpdateAppWidget_arrayILandroid_widget_RemoteViews_Handler")]
public virtual void UpdateAppWidget (int[]? appWidgetIds, Android.Widget.RemoteViews? views);
[<Android.Runtime.Register("updateAppWidget", "([ILandroid/widget/RemoteViews;)V", "GetUpdateAppWidget_arrayILandroid_widget_RemoteViews_Handler")>]
abstract member UpdateAppWidget : int[] * Android.Widget.RemoteViews -> unit
override this.UpdateAppWidget : int[] * Android.Widget.RemoteViews -> unit
Parameters
- appWidgetIds
- Int32[]
The AppWidget instances for which to set the RemoteViews.
- views
- RemoteViews
The RemoteViews object to show.
- Attributes
Remarks
Set the RemoteViews to use for the specified appWidgetIds.
Note that the RemoteViews parameter will be cached by the AppWidgetService, and hence should contain a complete representation of the widget. For performing partial widget updates, see #partiallyUpdateAppWidget(int[], RemoteViews)
.
It is okay to call this method both inside an #ACTION_APPWIDGET_UPDATE
broadcast, and outside of the handler. This method will only work when called from the uid that owns the AppWidget provider.
The total Bitmap memory used by the RemoteViews object cannot exceed that required to fill the screen 1.5 times, ie. (screen width x screen height x 4 x 1.5) bytes.
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.