Added in API level 3

AppWidgetHostView


open class AppWidgetHostView : FrameLayout
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.FrameLayout
   ↳ android.appwidget.AppWidgetHostView

Provides the glue to show AppWidget views. This class offers automatic animation between updates, and will try recycling old views for each incoming RemoteViews.

Summary

Inherited XML attributes
Inherited constants
Public constructors

Create a host view.

AppWidgetHostView(context: Context!, animationIn: Int, animationOut: Int)

Create a host view.

Public methods
open FrameLayout.LayoutParams!

Returns a new set of layout parameters based on the supplied attributes set.

open Int

open AppWidgetProviderInfo!

open static Rect!
getDefaultPaddingForWidget(context: Context!, component: ComponentName!, padding: Rect!)

As of ICE_CREAM_SANDWICH we are automatically adding padding to widgets targeting ICE_CREAM_SANDWICH and higher.

open Unit

Reset the dynamically overloaded resources, reverting to the default values for all the colors.

open Unit
setAppWidget(appWidgetId: Int, info: AppWidgetProviderInfo!)

Set the AppWidget that will be displayed by this view.

open Unit

Set the dynamically overloaded color resources.

open Unit
setExecutor(executor: Executor!)

Sets an executor which can be used for asynchronously inflating.

open Unit
setOnLightBackground(onLightBackground: Boolean)

Sets whether the widget is being displayed on a light/white background and use an alternate UI if available.

open Unit

Process a set of RemoteViews coming in as an update from the AppWidget provider.

open Unit

Specify some extra information for the widget provider.

open Unit
updateAppWidgetSize(newOptions: Bundle!, minWidth: Int, minHeight: Int, maxWidth: Int, maxHeight: Int)

Provide guidance about the size of this widget to the AppWidgetManager.

open Unit
updateAppWidgetSize(newOptions: Bundle, sizes: MutableList<SizeF!>)

Provide guidance about the size of this widget to the AppWidgetManager.

Protected methods
open Unit

Called by draw to draw the child views.

open Unit

open Unit

open View!

Inflate and return the default layout requested by AppWidget provider.

open View!

Inflate and return a view that represents an error state.

open Unit
onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int)

open Unit
prepareView(view: View!)

Prepare the given view to be shown.

Inherited functions