Skip to main content

react-native-android-widget

Interfaces

Type Aliases

WidgetConfigurationScreen

Ƭ WidgetConfigurationScreen: (props: WidgetConfigurationScreenProps) => JSX.Element

Type declaration

▸ (props): JSX.Element

Parameters
NameType
propsWidgetConfigurationScreenProps
Returns

JSX.Element


WidgetTaskHandler

Ƭ WidgetTaskHandler: (props: WidgetTaskHandlerProps) => Promise<void>

Type declaration

▸ (props): Promise<void>

Parameters
NameType
propsWidgetTaskHandlerProps
Returns

Promise<void>


ResourcePath

Ƭ ResourcePath: `./${string}` | `../${string}`


ImageWidgetSource

Ƭ ImageWidgetSource: ImageRequireSource | `http:${string}` | `https:${string}` | `data:image${string}`


SvgWidgetStyle

Ƭ SvgWidgetStyle: CommonStyleProps


HexColor

Ƭ HexColor: `#${string}`


RgbaColor

Ƭ RgbaColor: `rgba(${number}, ${number}, ${number}, ${number})`


ColorProp

Ƭ ColorProp: HexColor | RgbaColor

Functions

WidgetPreview

WidgetPreview(«destructured»): Element

Parameters

NameType
«destructured»WidgetPreviewProps

Returns

Element


getWidgetInfo

getWidgetInfo(widgetName): Promise<WidgetInfo[]>

Returns a list of widgetName widgets added on the home screen

Parameters

NameType
widgetNamestring

Returns

Promise<WidgetInfo[]>


registerWidgetConfigurationScreen

registerWidgetConfigurationScreen(WidgetConfigurationScreenComponent): void

Register a screen that will handle widget configuration

Parameters

NameTypeDescription
WidgetConfigurationScreenComponentWidgetConfigurationScreenWidgetConfigurationScreen

Returns

void


registerWidgetTaskHandler

registerWidgetTaskHandler(handler): void

Register a task handler that will handle widget actions

Parameters

NameTypeDescription
handlerWidgetTaskHandlerWidgetTaskHandler

Returns

void


requestWidgetUpdate

requestWidgetUpdate(param0): Promise<void>

Request widget update for a given widget name A callback will be called for each widget with that name that is added to the home screen

Parameters

NameTypeDescription
param0RequestWidgetUpdatePropsRequestWidgetUpdateProps

Returns

Promise<void>


requestWidgetUpdateById

requestWidgetUpdateById(param0): Promise<void>

Request widget update for a given widget name and id A callback will be called for the widget with the given id

Parameters

NameTypeDescription
param0RequestWidgetUpdateByIdPropsRequestWidgetUpdateByIdProps

Returns

Promise<void>


FlexWidget

FlexWidget(«destructured»): any

Parameters

NameType
«destructured»FlexWidgetProps

Returns

any


IconWidget

IconWidget(_): null

Parameters

NameType
_IconWidgetProps

Returns

null


ImageWidget

ImageWidget(_): null

Parameters

NameType
_ImageWidgetProps

Returns

null


ListWidget

ListWidget(«destructured»): any

Parameters

NameType
«destructured»ListWidgetProps

Returns

any


OverlapWidget

OverlapWidget(«destructured»): any

Parameters

NameType
«destructured»OverlapWidgetProps

Returns

any


SvgWidget

SvgWidget(_): null

Parameters

NameType
_SvgWidgetProps

Returns

null


TextWidget

TextWidget(_): null

Parameters

NameType
_TextWidgetProps

Returns

null