Behavior

interface Behavior<in T : View>

A Behavior can be used by Views and Themes to allow delegation of the View.render call and other characteristics of the View. This way, a View can support pluggable visual style and behavior.

Inheritors

Functions

Link copied to clipboard
open fun childrenClipPath(view: T): View.ClipPath?

Allows the Behavior to override the View's View.childrenClipPath property.

Link copied to clipboard
open fun clipCanvasToBounds(view: T): Boolean

Allows the Behavior to override the View's View.clipCanvasToBounds property.

Link copied to clipboard
open fun contains(view: T, point: Point): Boolean

Returns true if the point is within the View's bounds. This can be used to handle cases when the Behavior wants to control hit detection.

Link copied to clipboard
open fun install(view: T)

Called when the Behavior is applied to a View.

Link copied to clipboard

Allows the Behavior to override the View's View.mirrorWhenRightLeft property.

Link copied to clipboard
open fun render(view: T, canvas: Canvas)

Invoked to render the given View.

Link copied to clipboard
open fun uninstall(view: T)

Called when the Behavior is removed from a View.