Språk

AppWidgetCategory Enum

Definition

Enumerates values returned by several types.

This enumeration supports a bitwise combination of its member values.

[System.Flags]
public enum AppWidgetCategory
[<System.Flags>]
type AppWidgetCategory = 
Inheritance
AppWidgetCategory
Attributes

Fields

Name Value Description
HomeScreen 1

Indicates that the widget can be displayed on the home screen.

Keyguard 2

Indicates that the widget can be displayed on the keyguard.

4

Indicates that the widget can be displayed within a space reserved for the search box.

Android reference for android.appwidget.AppWidgetProviderInfo.WIDGET_CATEGORY_SEARCHBOX.

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.

NotKeyguard 8

Indicates that the widget should never be shown on the keyguard.

Some keyguard style features may decide that WIDGET_CATEGORY_KEYGUARD isn't required to be added by an app to show on the feature when chosen by a user. This category allows for a stronger statement about placement of the widget that, even in the above case, this widget should not be offered on the keyguard.

Setting this category doesn't change the behavior of AppWidgetManager queries, it is the responsibility of the widget surface to respect this value.

Android reference for android.appwidget.AppWidgetProviderInfo.WIDGET_CATEGORY_NOT_KEYGUARD.

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.

Remarks

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