AppWidgetTarget

open fun AppWidgetTarget(    context: Context,     width: Int,     height: Int,     viewId: Int,     remoteViews: RemoteViews,     widgetIds: Array<Int>)

Constructor using an int array of widgetIds to get a handle on the Widget in order to update it.

Parameters

context

Context to use in the AppWidgetManager initialization.

width

Desired width in pixels of the bitmap that will be loaded. (Needs to be manually put because of RemoteViews limitations.)

height

Desired height in pixels of the bitmap that will be loaded. (Needs to be manually put because of RemoteViews limitations.)

viewId

The id of the ImageView view that will load the image.

remoteViews

RemoteViews object which contains the ImageView that will load the bitmap.

widgetIds

The int[] that contains the widget ids of an application.


open fun AppWidgetTarget(    context: Context,     viewId: Int,     remoteViews: RemoteViews,     widgetIds: Array<Int>)

Constructor using an int array of widgetIds to get a handle on the Widget in order to update it that uses SIZE_ORIGINAL as the target width and height.

Parameters

context

Context to use in the AppWidgetManager initialization.

viewId

The id of the ImageView view that will load the image.

remoteViews

RemoteViews object which contains the ImageView that will load the bitmap.

widgetIds

The int[] that contains the widget ids of an application.


open fun AppWidgetTarget(    context: Context,     width: Int,     height: Int,     viewId: Int,     remoteViews: RemoteViews,     componentName: ComponentName)

Constructor using a ComponentName to get a handle on the Widget in order to update it.

Parameters

context

Context to use in the AppWidgetManager initialization.

width

Desired width in pixels of the bitmap that will be loaded. (Needs to be manually put because of RemoteViews limitations.)

height

Desired height in pixels of the bitmap that will be loaded. (Needs to be manually put because of RemoteViews limitations.)

viewId

The id of the ImageView view that will load the image.

remoteViews

RemoteViews object which contains the ImageView that will load the bitmap.

componentName

The ComponentName that refers to our AppWidget.


open fun AppWidgetTarget(    context: Context,     viewId: Int,     remoteViews: RemoteViews,     componentName: ComponentName)

Constructor using a ComponentName, when override has been put to get a handle on the Widget in order to update it that uses SIZE_ORIGINAL as the target width and height.

Parameters

context

Context to use in the AppWidgetManager initialization.

viewId

The id of the ImageView view that will load the image.

remoteViews

RemoteViews object which contains the ImageView that will load the bitmap.

componentName

The ComponentName that refers to our AppWidget.