react-native-android-widget
Interfaces
- ClickActionProps
- WidgetPreviewProps
- WidgetConfigurationScreenProps
- WidgetTaskHandlerProps
- RequestWidgetUpdateProps
- RequestWidgetUpdateByIdProps
- ScreenInfo
- WidgetInfo
- Widget
- WithAndroidWidgetsParams
- FlexWidgetStyle
- FlexWidgetProps
- IconWidgetStyle
- IconWidgetProps
- ImageWidgetProps
- ListWidgetStyle
- ListWidgetProps
- OverlapWidgetStyle
- OverlapWidgetProps
- SvgWidgetProps
- TextWidgetStyle
- TextWidgetProps
- MarginStyleProps
- PaddingStyleProps
- BorderStyleProps
- SizeStyleProps
- BackgroundStyleProps
- OtherStyleProps
- CommonStyleProps
Type Aliases
WidgetConfigurationScreen
Ƭ WidgetConfigurationScreen: (props
: WidgetConfigurationScreenProps
) => JSX.Element
Type declaration
▸ (props
): JSX.Element
Parameters
Name | Type |
---|---|
props | WidgetConfigurationScreenProps |
Returns
JSX.Element
WidgetTaskHandler
Ƭ WidgetTaskHandler: (props
: WidgetTaskHandlerProps
) => Promise
<void
>
Type declaration
▸ (props
): Promise
<void
>
Parameters
Name | Type |
---|---|
props | WidgetTaskHandlerProps |
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
Name | Type |
---|---|
«destructured» | WidgetPreviewProps |
Returns
Element
getWidgetInfo
▸ getWidgetInfo(widgetName
): Promise
<WidgetInfo
[]>
Returns a list of widgetName
widgets added on the home screen
Parameters
Name | Type |
---|---|
widgetName | string |
Returns
Promise
<WidgetInfo
[]>
registerWidgetConfigurationScreen
▸ registerWidgetConfigurationScreen(WidgetConfigurationScreenComponent
): void
Register a screen that will handle widget configuration
Parameters
Name | Type | Description |
---|---|---|
WidgetConfigurationScreenComponent | WidgetConfigurationScreen | WidgetConfigurationScreen |
Returns
void
registerWidgetTaskHandler
▸ registerWidgetTaskHandler(handler
): void
Register a task handler that will handle widget actions
Parameters
Name | Type | Description |
---|---|---|
handler | WidgetTaskHandler | WidgetTaskHandler |
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
Name | Type | Description |
---|---|---|
param0 | RequestWidgetUpdateProps | RequestWidgetUpdateProps |
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
Name | Type | Description |
---|---|---|
param0 | RequestWidgetUpdateByIdProps | RequestWidgetUpdateByIdProps |
Returns
Promise
<void
>
FlexWidget
▸ FlexWidget(«destructured»
): any
Parameters
Name | Type |
---|---|
«destructured» | FlexWidgetProps |
Returns
any
IconWidget
▸ IconWidget(_
): null
Parameters
Name | Type |
---|---|
_ | IconWidgetProps |
Returns
null
ImageWidget
▸ ImageWidget(_
): null
Parameters
Name | Type |
---|---|
_ | ImageWidgetProps |
Returns
null
ListWidget
▸ ListWidget(«destructured»
): any
Parameters
Name | Type |
---|---|
«destructured» | ListWidgetProps |
Returns
any
OverlapWidget
▸ OverlapWidget(«destructured»
): any
Parameters
Name | Type |
---|---|
«destructured» | OverlapWidgetProps |
Returns
any
SvgWidget
▸ SvgWidget(_
): null
Parameters
Name | Type |
---|---|
_ | SvgWidgetProps |
Returns
null
TextWidget
▸ TextWidget(_
): null
Parameters
Name | Type |
---|---|
_ | TextWidgetProps |
Returns
null