다음을 통해 공유


AppWidgetManager.GetWidgetPreview Method

Definition

Get the RemoteViews previews for this widget.

[Android.Runtime.Register("getWidgetPreview", "(Landroid/content/ComponentName;Landroid/os/UserHandle;I)Landroid/widget/RemoteViews;", "GetGetWidgetPreview_Landroid_content_ComponentName_Landroid_os_UserHandle_IHandler", ApiSince=35)]
public virtual Android.Widget.RemoteViews? GetWidgetPreview (Android.Content.ComponentName provider, Android.OS.UserHandle? profile, Android.Appwidget.AppWidgetCategory widgetCategory);
[<Android.Runtime.Register("getWidgetPreview", "(Landroid/content/ComponentName;Landroid/os/UserHandle;I)Landroid/widget/RemoteViews;", "GetGetWidgetPreview_Landroid_content_ComponentName_Landroid_os_UserHandle_IHandler", ApiSince=35)>]
abstract member GetWidgetPreview : Android.Content.ComponentName * Android.OS.UserHandle * Android.Appwidget.AppWidgetCategory -> Android.Widget.RemoteViews
override this.GetWidgetPreview : Android.Content.ComponentName * Android.OS.UserHandle * Android.Appwidget.AppWidgetCategory -> Android.Widget.RemoteViews

Parameters

provider
ComponentName

The ComponentName for the android.content.BroadcastReceiver BroadcastReceiver provider for the AppWidget you intend to get a preview for.

profile
UserHandle

The profile in which the provider resides. Passing null is equivalent to querying for only the calling user.

widgetCategory
AppWidgetCategory

The widget category for which you want to display previews. This should be a single category. If a combination of categories is provided, this function will return a preview that matches at least one of the categories.

Returns

The widget preview for the selected category, if available.

Attributes

Remarks

Get the RemoteViews previews for this widget.

Java documentation for android.appwidget.AppWidgetManager.getWidgetPreview(android.content.ComponentName, android.os.UserHandle, int).

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