語言

AppWidgetManager.UpdateAppWidget 方法

定義

多載

名稱 Description
UpdateAppWidget(ComponentName, RemoteViews)

將 RemoteViews 設定為所有 AppWidget 實例的 AppWidget 提供者使用。

UpdateAppWidget(Int32, RemoteViews)

將 RemoteViews 設定為用於指定的 appWidgetId。

UpdateAppWidget(Int32[], RemoteViews)

將 RemoteViews 設定為用於指定的 appWidgetIds。

UpdateAppWidget(ComponentName, RemoteViews)

將 RemoteViews 設定為所有 AppWidget 實例的 AppWidget 提供者使用。

[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

參數

provider
ComponentName

這是 ComponentName 針對 android.content.BroadcastReceiver BroadcastReceiver 你的 AppWidget 供應商。

views
RemoteViews

RemoteViews 物件要顯示。

屬性

備註

將 RemoteViews 設定為所有 AppWidget 實例的 AppWidget 提供者使用。

在廣播內 #ACTION_APPWIDGET_UPDATE 或處理器外呼叫此方法皆可。 此方法僅在擁有 AppWidget 提供者的 UID 呼叫時有效。

Java 文件 android.appwidget.AppWidgetManager.updateAppWidget(android.content.ComponentName, android.widget.RemoteViews)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

UpdateAppWidget(Int32, RemoteViews)

將 RemoteViews 設定為用於指定的 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

參數

appWidgetId
Int32

用來設定 RemoteViews 的 AppWidget 實例。

views
RemoteViews

RemoteViews 物件要顯示。

屬性

備註

將 RemoteViews 設定為用於指定的 appWidgetId。

請注意,RemoteViews 參數會被 AppWidgetService 快取,因此應該包含該元件的完整表示。 關於執行部分小工具更新,請參見 #partiallyUpdateAppWidget(int, RemoteViews)。

在廣播內 #ACTION_APPWIDGET_UPDATE 或處理器外呼叫此方法皆可。 此方法僅在擁有 AppWidget 提供者的 UID 呼叫時有效。

RemoteViews 物件所使用的總位圖記憶體不得超過填滿螢幕 1.5 倍所需的長度,也就是說,(螢幕寬度 x 螢幕高度 x 4 x 1.5)位元組。

Java 文件 android.appwidget.AppWidgetManager.updateAppWidget(int, android.widget.RemoteViews)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

UpdateAppWidget(Int32[], RemoteViews)

將 RemoteViews 設定為用於指定的 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

參數

appWidgetIds
Int32[]

AppWidget 實例,用來設定 RemoteViews。

views
RemoteViews

RemoteViews 物件要顯示。

屬性

備註

將 RemoteViews 設定為用於指定的 appWidgetIds。

請注意,RemoteViews 參數會被 AppWidgetService 快取,因此應該包含該元件的完整表示。 關於執行部分小工具更新,請參見 #partiallyUpdateAppWidget(int[], RemoteViews)。

在廣播內 #ACTION_APPWIDGET_UPDATE 或處理器外呼叫此方法皆可。 此方法僅在擁有 AppWidget 提供者的 UID 呼叫時有效。

RemoteViews 物件所使用的總位圖記憶體不得超過填滿螢幕 1.5 倍所需的長度,也就是說,(螢幕寬度 x 螢幕高度 x 4 x 1.5)位元組。

Java 文件 android.appwidget.AppWidgetManager.updateAppWidget(int[], android.widget.RemoteViews)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於