Sdílet prostřednictvím


AppWidgetManager.PartiallyUpdateAppWidget Method

Definition

Overloads

PartiallyUpdateAppWidget(Int32, RemoteViews)

Perform an incremental update or command on the widget specified by appWidgetId.

PartiallyUpdateAppWidget(Int32[], RemoteViews)

Perform an incremental update or command on the widget(s) specified by appWidgetIds.

PartiallyUpdateAppWidget(Int32, RemoteViews)

Perform an incremental update or command on the widget specified by appWidgetId.

[Android.Runtime.Register("partiallyUpdateAppWidget", "(ILandroid/widget/RemoteViews;)V", "GetPartiallyUpdateAppWidget_ILandroid_widget_RemoteViews_Handler")]
public virtual void PartiallyUpdateAppWidget (int appWidgetId, Android.Widget.RemoteViews? views);
[<Android.Runtime.Register("partiallyUpdateAppWidget", "(ILandroid/widget/RemoteViews;)V", "GetPartiallyUpdateAppWidget_ILandroid_widget_RemoteViews_Handler")>]
abstract member PartiallyUpdateAppWidget : int * Android.Widget.RemoteViews -> unit
override this.PartiallyUpdateAppWidget : int * Android.Widget.RemoteViews -> unit

Parameters

appWidgetId
Int32

The AppWidget instance for which to set the RemoteViews.

views
RemoteViews

The RemoteViews object containing the incremental update / command.

Attributes

Remarks

Perform an incremental update or command on the widget specified by appWidgetId.

This update differs from #updateAppWidget(int, RemoteViews) in that the RemoteViews object which is passed is understood to be an incomplete representation of the widget, and hence is not cached by the AppWidgetService. Note that because these updates are not cached, any state that they modify that is not restored by restoreInstanceState will not persist in the case that the widgets are restored using the cached version in AppWidgetService.

Use with RemoteViews#showNext(int), RemoteViews#showPrevious(int), RemoteViews#setScrollPosition(int, int) and similar commands.

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.

This method will be ignored if a widget has not received a full update via #updateAppWidget(int[], RemoteViews).

Java documentation for android.appwidget.AppWidgetManager.partiallyUpdateAppWidget(int, android.widget.RemoteViews).

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

PartiallyUpdateAppWidget(Int32[], RemoteViews)

Perform an incremental update or command on the widget(s) specified by appWidgetIds.

[Android.Runtime.Register("partiallyUpdateAppWidget", "([ILandroid/widget/RemoteViews;)V", "GetPartiallyUpdateAppWidget_arrayILandroid_widget_RemoteViews_Handler")]
public virtual void PartiallyUpdateAppWidget (int[]? appWidgetIds, Android.Widget.RemoteViews? views);
[<Android.Runtime.Register("partiallyUpdateAppWidget", "([ILandroid/widget/RemoteViews;)V", "GetPartiallyUpdateAppWidget_arrayILandroid_widget_RemoteViews_Handler")>]
abstract member PartiallyUpdateAppWidget : int[] * Android.Widget.RemoteViews -> unit
override this.PartiallyUpdateAppWidget : int[] * Android.Widget.RemoteViews -> unit

Parameters

appWidgetIds
Int32[]

The AppWidget instances for which to set the RemoteViews.

views
RemoteViews

The RemoteViews object containing the incremental update / command.

Attributes

Remarks

Perform an incremental update or command on the widget(s) specified by appWidgetIds.

This update differs from #updateAppWidget(int[], RemoteViews) in that the RemoteViews object which is passed is understood to be an incomplete representation of the widget, and hence does not replace the cached representation of the widget. As of API level 17, the new properties set within the views objects will be appended to the cached representation of the widget, and hence will persist.

Use with RemoteViews#showNext(int), RemoteViews#showPrevious(int), RemoteViews#setScrollPosition(int, int) and similar commands.

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.

This method will be ignored if a widget has not received a full update via #updateAppWidget(int[], RemoteViews).

Java documentation for android.appwidget.AppWidgetManager.partiallyUpdateAppWidget(int[], android.widget.RemoteViews).

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