Modifier and Type | Class and Description |
---|---|
static interface |
LithoView.LayoutManagerOverrideParams
LayoutParams that override the LayoutManager.
|
static interface |
LithoView.OnDirtyMountListener |
static interface |
LithoView.OnPostDrawListener |
Modifier and Type | Field and Description |
---|---|
static String |
SET_ALREADY_ATTACHED_COMPONENT_TREE |
static String |
ZERO_HEIGHT_LOG |
Constructor and Description |
---|
LithoView(ComponentContext context,
AttributeSet attrs) |
LithoView(ComponentContext context,
AttributeSet attrs,
boolean useExtensions,
boolean delegateToRenderCore) |
LithoView(ComponentContext context,
boolean useExtensions,
boolean delegateToRenderCore) |
LithoView(Context context) |
LithoView(Context context,
AttributeSet attrs) |
Modifier and Type | Method and Description |
---|---|
static LithoView |
create(Context context,
Component component)
|
static LithoView |
create(Context context,
Component component,
boolean isReconciliationEnabled)
Deprecated.
Use
create(Context, Component) instead and set config explicitly on the
ComponentTree using ComponentTree.Builder.isReconciliationEnabled(boolean) . |
void |
dispatchVisibilityEvent(Class<?> visibilityEventType)
Deprecated.
|
void |
draw(Canvas canvas) |
protected void |
forceRelayout() |
ComponentContext |
getComponentContext() |
ComponentTree |
getComponentTree() |
Rect |
getPreviousMountBounds() |
boolean |
isIncrementalMountEnabled() |
void |
notifyVisibleBoundsChanged() |
void |
notifyVisibleBoundsChanged(Rect visibleRect,
boolean processVisibilityOutputs) |
void |
offsetLeftAndRight(int offset) |
void |
offsetTopAndBottom(int offset) |
protected void |
onAttachedToWindow() |
void |
onAttachedToWindowForTest() |
protected void |
onDetachedFromWindow() |
void |
onDetachedFromWindowForTest() |
void |
onFinishTemporaryDetach() |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
void |
onStartTemporaryDetach() |
protected void |
performLayout(boolean changed,
int left,
int top,
int right,
int bottom) |
void |
rebind() |
void |
release() |
void |
rerenderForAccessibility(boolean enabled) |
void |
resetMountStartupLoggingInfo() |
void |
setAnimatedHeight(int height)
Sets the height that the LithoView should take on the next measure pass and then requests a
layout.
|
void |
setAnimatedWidth(int width)
Sets the width that the LithoView should take on the next measure pass and then requests a
layout.
|
void |
setComponent(Component component)
Change the root component synchronously.
|
void |
setComponentAsync(Component component)
Change the root component measuring it on a background thread before updating the UI.
|
void |
setComponentAsyncWithoutReconciliation(Component component)
Deprecated.
Use
getComponentTree() and ComponentTree.setRootAsync(Component)
instead; set the config explicitly on the ComponentTree using ComponentTree.Builder.isReconciliationEnabled(boolean) . |
void |
setComponentTree(ComponentTree componentTree) |
void |
setComponentWithoutReconciliation(Component component)
Deprecated.
Use
getComponentTree() and ComponentTree.setRoot(Component)
instead; set the config explicitly on the ComponentTree using ComponentTree.Builder.isReconciliationEnabled(boolean) . |
void |
setHasTransientState(boolean hasTransientState) |
void |
setInvalidStateLogParamsList(List<ComponentLogParams> logParamsList)
Register for particular invalid state logs.
|
void |
setMountStartupLoggingInfo(LithoStartupLogger startupLogger,
String startupLoggerAttribution,
boolean[] firstMountCalled,
boolean[] lastMountCalled,
boolean isLastAdapterItem,
boolean isOrientationVertical) |
void |
setOnDirtyMountListener(LithoView.OnDirtyMountListener onDirtyMountListener) |
void |
setOnPostDrawListener(LithoView.OnPostDrawListener onPostDrawListener) |
void |
setTranslationX(float translationX) |
void |
setTranslationY(float translationY) |
void |
setVisibilityHint(boolean isVisible)
Call this to tell the LithoView whether it is visible or not.
|
protected boolean |
shouldAlwaysLayoutChildren()
Indicates if the children of this view should be laid regardless to a mount step being
triggered on layout.
|
protected boolean |
shouldRequestLayout() |
void |
startTemporaryDetach() |
void |
suppressMeasureComponentTree(boolean suppress)
If set to true, the onMeasure(..) call won't measure the ComponentTree with the given measure
specs, but it will just use them as measured dimensions.
|
String |
toString() |
void |
unbind()
To be called this when the LithoView is about to become inactive.
|
void |
unmountAllItems() |
addView, addView, addView, addViewForTest, addViewInLayout, attachViewToParent, dispatchDraw, dispatchHoverEvent, drawableStateChanged, getChildDrawingOrder, getClipChildren, getComponentTouchListener, getContentDescription, getContentDescriptions, getContentNames, getDrawables, getImageContent, getLinkedDrawablesForAnimation, getMountItemAt, getMountItemCount, getTag, getTag, getTextContent, jumpDrawablesToCurrentState, mount, mount, moveItem, onInterceptTouchEvent, onLayout, onTouchEvent, performAccessibilityAction, refreshAccessibilityDelegatesIfNeeded, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestDisallowInterceptTouchEvent, requestLayout, setAccessibilityDelegate, setClipChildren, setContentDescription, setTag, setViewTag, setViewTags, setVisibility, shouldDelayChildPressedState, unmount, unmount, verifyDrawable
public static final String ZERO_HEIGHT_LOG
public static final String SET_ALREADY_ATTACHED_COMPONENT_TREE
public LithoView(Context context)
public LithoView(Context context, AttributeSet attrs)
public LithoView(ComponentContext context, boolean useExtensions, boolean delegateToRenderCore)
public LithoView(ComponentContext context, AttributeSet attrs)
public LithoView(ComponentContext context, AttributeSet attrs, boolean useExtensions, boolean delegateToRenderCore)
@Deprecated public static LithoView create(Context context, Component component, boolean isReconciliationEnabled)
create(Context, Component)
instead and set config explicitly on the
ComponentTree
using ComponentTree.Builder.isReconciliationEnabled(boolean)
.protected void forceRelayout()
public void startTemporaryDetach()
protected void onAttachedToWindow()
protected void onDetachedFromWindow()
public void onAttachedToWindowForTest()
public void onDetachedFromWindowForTest()
public void onStartTemporaryDetach()
public void onFinishTemporaryDetach()
public void suppressMeasureComponentTree(boolean suppress)
public void setAnimatedWidth(int width)
public void setAnimatedHeight(int height)
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
protected void performLayout(boolean changed, int left, int top, int right, int bottom)
protected boolean shouldAlwaysLayoutChildren()
Since the framework doesn't expect its children to resize after being mounted, this should be used only for extreme cases where the underline views are complex and need this behavior.
public ComponentContext getComponentContext()
ComponentContext
associated with this LithoView. It's a wrapper on the Context
originally used to create this LithoView itself.protected boolean shouldRequestLayout()
shouldRequestLayout
in class ComponentHost
public ComponentTree getComponentTree()
public void setOnDirtyMountListener(LithoView.OnDirtyMountListener onDirtyMountListener)
public void setOnPostDrawListener(LithoView.OnPostDrawListener onPostDrawListener)
public void setComponentTree(ComponentTree componentTree)
public void setComponent(Component component)
@Deprecated public void setComponentWithoutReconciliation(Component component)
getComponentTree()
and ComponentTree.setRoot(Component)
instead; set the config explicitly on the ComponentTree
using ComponentTree.Builder.isReconciliationEnabled(boolean)
.setComponent(Component)
.public void setComponentAsync(Component component)
LithoView
doesn't have a ComponentTree initialized, the root will be computed
synchronously.@Deprecated public void setComponentAsyncWithoutReconciliation(Component component)
getComponentTree()
and ComponentTree.setRootAsync(Component)
instead; set the config explicitly on the ComponentTree
using ComponentTree.Builder.isReconciliationEnabled(boolean)
.LithoView
doesn't have a ComponentTree initialized, the root will be computed
synchronously with reconciliation disabled. DO NOT USE this method; it was added only to
deprecate the current usages of setComponentAsync(Component)
.public void rebind()
public void unbind()
public void setVisibilityHint(boolean isVisible)
isVisible
- if true, this will find the current visible rect and process visibility
outputs using it. If false, any invisible and unfocused events will be called.public void setHasTransientState(boolean hasTransientState)
public void offsetTopAndBottom(int offset)
public void offsetLeftAndRight(int offset)
public void setTranslationX(float translationX)
public void setTranslationY(float translationY)
public void draw(Canvas canvas)
public void notifyVisibleBoundsChanged(Rect visibleRect, boolean processVisibilityOutputs)
public void notifyVisibleBoundsChanged()
public boolean isIncrementalMountEnabled()
public void release()
@Deprecated public void dispatchVisibilityEvent(Class<?> visibilityEventType)
Marked as @Deprecated to indicate this method is experimental and should not be widely used.
NOTE: Can only be used when Incremental Mount is disabled! Call this method when the LithoView is considered eligible for the visibility event (i.e. only dispatch VisibleEvent when the LithoView is visible in its container).
visibilityEventType
- The class type of the visibility event to dispatch. Supported:
VisibleEvent.class, InvisibleEvent.class, FocusedVisibleEvent.class,
UnfocusedVisibleEvent.class, FullImpressionVisibleEvent.class.public void unmountAllItems()
public Rect getPreviousMountBounds()
public void setMountStartupLoggingInfo(LithoStartupLogger startupLogger, String startupLoggerAttribution, boolean[] firstMountCalled, boolean[] lastMountCalled, boolean isLastAdapterItem, boolean isOrientationVertical)
public void resetMountStartupLoggingInfo()
public void setInvalidStateLogParamsList(List<ComponentLogParams> logParamsList)
public void rerenderForAccessibility(boolean enabled)
public String toString()