public interface Binder<V extends ViewGroup>
Component
and attaching them to a ViewGroup
through the
bind(ViewGroup)
method.Modifier and Type | Method and Description |
---|---|
void |
bind(V view)
Bind this
Binder to a View . |
ComponentTree |
getComponentAt(int position)
Returns the component at the given position in the binder.
|
void |
measure(Size outSize,
int widthSpec,
int heightSpec,
EventHandler<ReMeasureEvent> reMeasureEventHandler)
Measure the content of this Binder.
|
void |
mount(V view)
Call this method before the
View is mounted, i.e. |
void |
setSize(int width,
int height)
Set the width and height of the
View that will be passed to the subsequent
mount(ViewGroup) , bind(ViewGroup) and unmount(ViewGroup) calls. |
void |
setViewportChangedListener(ViewportInfo.ViewportChanged viewportChangedListener)
Bind a
ViewportInfo.ViewportChanged listener to this Binder . |
void |
unbind(V view)
Call this method when the view is unbound.
|
void |
unmount(V view)
Call this method when the view is unmounted.
|
void setSize(int width, int height)
View
that will be passed to the subsequent
mount(ViewGroup)
, bind(ViewGroup)
and unmount(ViewGroup)
calls.
Can be called by any thread.width
- Usually the view width minus horizontal padding.height
- Usually the view height minus vertical padding.void measure(Size outSize, int widthSpec, int heightSpec, EventHandler<ReMeasureEvent> reMeasureEventHandler)
ComponentTree getComponentAt(int position)
void mount(V view)
View
is mounted, i.e. within
com.facebook.litho.ComponentLifecycle#onMount(Context, Object, Component)
void bind(V view)
void unbind(V view)
view
- the view being unbound.void unmount(V view)
view
- the view being unmounted.void setViewportChangedListener(@Nullable ViewportInfo.ViewportChanged viewportChangedListener)
ViewportInfo.ViewportChanged
listener to this Binder
.
The listener will be notified of Viewport changes.viewportChangedListener
-