Package-level declarations
Types
Keeps the list item information that will allow the framework to understand how to render it.
LinearSmoothScroller subclass that snaps the target position to center.
A callback invoked when the data for a section has been dispatched to the underlying RecyclerView. This can happen after setRoot is called because the setRoot may be async, or we may wait for layouts to complete before inserting into the adapter.
Event sent to TextEdit to clear focus.
Abstract class representing an item in a collection that can be rendered as a child view of a collection. This class provides the foundation for managing collection items with their rendering lifecycle.
Abstract base class for holders that manage root host views in collection items. This class serves as a foundation for view holders that need to provide access to a root view and maintain associated data for collection items.
A value class that wraps an integer representing the orientation of a collection. This provides type safety and convenience methods for working with RecyclerView orientations.
This class is responsible for preparing the items in the collection. It will prepare the items that are in the viewport and the items that are in the range of the viewport.
RecyclerView adapter that can be used to render a list of CollectionItems. The adapter will create a PrimitiveRecyclerViewHolder for each item and will call CollectionItem.onBindView and CollectionItem.onViewRecycled on the holder when the item is bound and recycle respectively.
A helper class to manage scrolling behavior in the LithoRecyclerView.
A provider function for a Component.
RenderInfo that can render components.
A class used to store the data backing a RecyclerBinder. For each item the ComponentTreeHolder keeps the RenderInfo which contains the original Component and either the ComponentTree or the TreeState depending upon whether the item is within the current working range or not.
Pool for pre-computing and storing ComponentTrees. Can be used to pre-compute and store ComponentTrees before they are inserted in a RecyclerBinder. The RecyclerBinder will fetch the precomputed ComponentTree from the pool if it's available instead of computing a layout calculation when the item needs to be computed.
Interface to provide name of the model used for tracing purposes.
LinearSmoothScroller subclass that snaps the target position to start/end or either ends.
Event sent by EditText when the return key is pressed or the IME signals an 'action'. Return true if the handler consumed the event.
EditTextStateUpdatePolicy specifies when EditText component should update its internal input state
A component that renders a given component into a card border with shadow.
A component that paints rounded edges to mimic a clipping operation on the component being rendered below it. Used in CardSpec.
A component that is able to render the card's shadow.
A component to render a Drawable.
A component that renders a solid color.
A component that paints a card with rounded edges to perform a clipping operation on the component being rendered below it. Used in CardSpec when transparencyEnabled(true).
Use this with TextInput to get the field's current line count.
Return the beginning of the range of text to which the specified markup object is attached.
Use this with TextInput to get the field's current text.
Event sent to TextEdit to make cursor invisible.
A controller that can be passed as com.facebook.litho.annotations.Prop to a [ ] to trigger events from outside the component hierarchy.
Extension of HorizontalScrollView that allows to add more features needed for HorizontalScrollSpec and ExperimentalHorizontalScroll primitive component.
Event that corresponds to an underlying android.widget.EditText#onCreateInputConnection(EditorInfo editorInfo). If you handled the event, return either the input connection passed through the parameter or a Wrapper using androidx.core.view.inputmethod.InputConnectionCompat#createWrapper.
Event sent by EditText when the input focus changed by user
Creates an ItemDecoration that provides the developer a function to measure the View if the insets required depend on the measured size of the View. The measure function will use the size constraints recorded by Binder of the Recycler Component. This approach is required because the RecyclerView gets the insets from the ItemDecoration before the View is measured, so the measured size of the view is 0, and the insets would not be correct.
Class that provides scope and context information for item size constraint calculations in collection layouts. This class encapsulates the essential parameters needed to determine how individual items should be sized within a collection.
Event that corresponds to an underlying android.widget.EditText#onKeyPreIme(). If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.
Event that corresponds to an underlying android.widget.EditText#onKeyUp(). If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.
A Factory used to create RunnableHandlers in RecyclerBinder.
An implementation of this interface will provide the RecyclerBinder with all the information about the RecyclerView layout.
Utility class for calculating the wrapped height of given holders.
An implementation for LayoutInfo to implement linear lists with a LinearLayoutManager.
A CollectionItem that renders a LithoRenderTreeView.
Extension of RecyclerView that allows to add more features needed for Recycler
Extension of NestedScrollView that allows to add more features needed for VerticalScrollSpec.
A factory used to create LithoViews in RecyclerBinder.
Mountable CharSequence that is aware when the Text component using this CharSequence is mounted and unmounted.
Because a LayoutInfo/LayoutManager may rely on padding to generate a child measure specs, and because padding isn't accessible in a thread-safe way, this interface gives a LayoutManager the chance to record the RecyclerView's padding when it's attached.
The layout data required by the Image Primitive to mount, and bind the drawable in the host.
A ViewHolder implementation for RecyclerView that manages primitive views through delegation. This class wraps a CollectionItemRootHostHolder delegate to provide RecyclerView compatibility while maintaining access to the underlying view and associated data.
Renders an infinitely spinning progress bar.
Renders an infinitely spinning progress bar.
An event that is triggered when a pull-to-refresh action is performed.
A delegation that is used to customize the adapter behaviour for the RecyclerView that the RecyclerBinder uses.
This configuration is meant to be used in the context of RecyclerBinder. It allows you to define to define specific behavior changes to the default behaviour of the RecyclerBinder.
This builder is just a helper class for Java clients.
An implementation of RecyclerBinderUpdateCallback.OperationExecutor that uses RecyclerBinder.
An implementation of ListUpdateCallback that generates the relevant com.facebook.litho.Components when an item is inserted/updated.
The ViewHolder that hosts LithoView used by RecyclerBinder
An controller that can be passed as com.facebook.litho.annotations.Prop to a Recycler component to trigger events from outside the component hierarchy.
An interface for generating traversing order for a range.
An event that a RecyclerBinder can trigger to notify the Recycler that it should re-measure.
Remove the specified object from the range of text to which it was attached.
Holds a mapping of Views inside a Litho hierarchy to related debugging information. This is needed as a way of passing data to Views inside a Section hierarchy without relying on the specific type of view that is used. For example, while a ComponentRenderInfo will be rendered inside a LithoView always, a ViewRenderInfo could be using any type of View. This is to avoid passing debugging data through structures that could be used by developers, such as the view tag.
Helper class to keep track of the different view types that we're rendering using ViewRenderInfo.
Replaces the text input text from startIndex to endIndex with the given text.
Event sent to TextEdit to request focus.
Scroll change listener invoked when the scroll position changes.
Utilities for sections debugging. Note: this should probably be in the sections package, but that package has a dependency on the widget package where RecyclerBinder lives.
Wrapper that encapsulates all the features Recycler provides such as sticky header and pull-to-refresh
Event sent by EditText when the selection (particular case: cursor position) gets changed by user
Event sent to TextEdit to send accessibility event.
Use this with TextInput to set the field's current selection.
Attach the specified markup object to the range (start, end) of the text, or move the object to that range if it was already attached elsewhere.
Use this with TextInput to set the field's current text.
Event sent to TextEdit to make cursor visible.
Utility class containing snapping related behavior of RecyclerView.
A simple spinner (dropdown) component. Derived from the standard Android android.widget.Spinner
An implementation for LayoutInfo to implement staggered grids with a StaggeredGridLayoutManager.
Enumeration of text alignment values. These values differ from android.text.Layout.Alignment and View.TEXT_ALIGNMENT_*
because this full list of values is not supported by either implementation.
Event sent by EditText when the text entered by the user changes.
Component to render text. See text-widget for more details.
A Drawable for mounting text content from a com.facebook.litho.Component.
Text component should implement an event of this type in order to receive callback on what was the text offset when text was touched initially. This event is fired only when motion event action is ACTION_DOWN.
Event sent by EditText when the text entered is pasted from clipboard.
A class that schedules a background draw of a Layout or Drawable. Drawing a Layout in the background ensures that the glyph caches are warmed up and ready for drawing the same Layout on a real Canvas. This will substantially reduce drawing times for big chunks of text. On the other hand over-using text warming might rotate the glyphs cache too quickly and diminish the optimization. Similarly, for Drawable starting on art it will be put in a texture cache of RenderNode, which will speed up drawing.
A Component that can wrap another component to add touch feedback via a RippleDrawable background.
A wrapper around RenderInfo that also stores TreeProps used for rendering the component.
Enum for setting vertical gravity of a component. Currently used to design where to vertically align text in a text component.
A controller that can be passed as com.facebook.litho.annotations.Prop to a VerticalScrollSpec to trigger events from outside the component hierarchy.
An implementation of this interface will provide both the androidx.recyclerview.widget.RecyclerView's current visible views position and the total number of items in its androidx.recyclerview.widget.RecyclerView.Adapter.
This class will handle all viewport changes due to both scrolling and ViewHolder removal that is not related to scrolling.
RenderInfo that can render views.
Collection of the AttributeKey that are used across Litho's widgets.
Properties
Functions
Checks if the provided size constraints are compatible with this CollectionItem's current size constraints and measured size.
Binds the sectionsRecyclerView to the data according to the behavior that was present in the initial version of the RecyclerSpec regarding the attach binders (previously RecyclerSpec.onBind).
Binds the sectionsRecyclerView to the data according to the behavior that was present in the initial version of the RecyclerSpec regarding mount binders (previously RecyclerSpec.onMount
).
Measures the size of the Collection.
Calculates the size constraints for the child of the Recycler.
Unbinds the sectionsRecyclerView to the data according to the behavior that was present in the initial version of the RecyclerSpec regarding the attach binders (previously RecyclerSpec.onUnbind
).
Unbinds the sectionsRecyclerView to the data according to the behavior that was present in the initial version of the RecyclerSpec regarding mount binders (previously RecyclerSpec.onUnmount
).