Binder

interface Binder<V : ViewGroup?>

This binder class is used to asynchronously layout Components given a list of Component and attaching them to a ViewGroup through the bind method.

Inheritors

Functions

Link copied to clipboard
abstract fun bind(view: V)
Bind this Binder to a View.
Link copied to clipboard
abstract fun canMeasure(): Boolean
Only for horizontally scrolling layouts: return true if height is not known when measuring the view and the first item will be measured to determine the height.
Link copied to clipboard
abstract fun detach()
Detach items under the hood.
Link copied to clipboard
abstract fun getComponentAt(position: Int): ComponentTree
Returns the component at the given position in the binder.
Link copied to clipboard
abstract fun isWrapContent(): Boolean
Return true if wrap content is enabled, false otherwise.
Link copied to clipboard
abstract fun measure(outSize: Size, widthSpec: Int, heightSpec: Int, reMeasureEventHandler: EventHandler<ReMeasureEvent>)
Measure the content of this Binder.
Link copied to clipboard
abstract fun mount(view: V)
Call this method before the View is mounted, i.e.
Link copied to clipboard
abstract fun setCanMeasure(canMeasure: Boolean)
Only for horizontally scrolling layouts: set to true if height is not known when measuring the view and the first item will need to be measured to determine the height of the view.
Link copied to clipboard
abstract fun setSize(width: Int, height: Int)
Set the width and height of the View that will be passed to the subsequent mount, bind and unmount calls.
Link copied to clipboard
abstract fun setViewportChangedListener(@Nullable viewportChangedListener: ViewportInfo.ViewportChanged)
Bind a ViewportInfo.ViewportChanged listener to this Binder.
Link copied to clipboard
abstract fun unbind(view: V)
Call this method when the view is unbound.
Link copied to clipboard
abstract fun unmount(view: V)
Call this method when the view is unmounted.