Package-level declarations

Types

Link copied to clipboard
abstract class BaseRenderInfo : RenderInfo
Keeps the list item information that will allow the framework to understand how to render it.
Link copied to clipboard
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.
Link copied to clipboard
class Button(text: String, style: Style? = null) : KComponent
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
LinearSmoothScroller subclass that snaps the target position to center.
Link copied to clipboard
A callback invoked when the data for a section has been dispatched to the underlying RecyclerView.
Link copied to clipboard
open class ClearFocusEvent
Event sent to TextEdit to clear focus.
Link copied to clipboard
A listener that reacts to click and long click events on a clickable span.
Link copied to clipboard
A provider function for a Component.
Link copied to clipboard
RenderInfo that can render components.
Link copied to clipboard
@ThreadSafe
open class ComponentTreeHolder
A class used to store the data backing a RecyclerBinder.
Link copied to clipboard
open class ComponentWarmer
Pool for pre-computing and storing ComponentTrees.
Link copied to clipboard
Implementation of the LinearSnapHelper supporting hscroll custom target child view The implementation will snap the center of the custom target child view to the center of the attached RecyclerView.
Link copied to clipboard
Interface to provide name of the model used for tracing purposes.
Link copied to clipboard
Link copied to clipboard
LinearSmoothScroller subclass that snaps the target position to start/end or either ends.
Link copied to clipboard
Event sent by EditText when the return key is pressed or the IME signals an 'action'.
Link copied to clipboard

EditTextStateUpdatePolicy specifies when EditText component should update its internal input state

Link copied to clipboard
class ExperimentalImage(drawable: Drawable?, scaleType: ImageView.ScaleType = ScaleType.FIT_CENTER, useIntrinsicSize: Boolean = true, style: Style? = null) : PrimitiveComponent

A component to render a Drawable.

Link copied to clipboard
class ExperimentalSolidColor(@ColorInt color: Int, alpha: Float = -1.0f, style: Style? = null) : KComponent

A component that renders a solid color.

Link copied to clipboard
class ExperimentalVerticalScroll(val scrollbarEnabled: Boolean, val nestedScrollingEnabled: Boolean, val verticalFadingEdgeEnabled: Boolean, val fillViewport: Boolean, val scrollbarFadingEnabled: Boolean, val overScrollMode: Int, val fadingEdgeLength: Dimen, @ColorInt val fadingEdgeColor: Int?, val initialScrollPosition: Dimen, val eventsController: VerticalScrollEventsController?, val onScrollChange: (NestedScrollView, scrollY: Int, oldScrollY: Int) -> Unit?, val onInterceptTouch: (NestedScrollView, event: MotionEvent) -> Boolean?, val onScrollStateChange: (View, Int) -> Unit?, val incrementalMountEnabled: Boolean = true, val child: Component, val style: Style?) : PrimitiveComponent
Link copied to clipboard
Use this with TextInput to get the field's current line count.
Link copied to clipboard
Return the beginning of the range of text to which the specified markup object is attached.
Link copied to clipboard
open class GetTextEvent
Use this with TextInput to get the field's current text.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Event sent to TextEdit to make cursor invisible.

Link copied to clipboard
A controller that can be passed as com.facebook.litho.annotations.Prop to a to trigger events from outside the component hierarchy.
Link copied to clipboard
Extension of HorizontalScrollView that allows to add more features needed for @.
Link copied to clipboard
object ImageSpec

A component that is able to display drawable resources. It takes a drawable resource ID as prop.

Link copied to clipboard
Event that corresponds to an underlying android.widget.EditText#onCreateInputConnection(EditorInfo editorInfo).
Link copied to clipboard
Event sent by EditText when the input focus changed by user
Link copied to clipboard

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.

Link copied to clipboard
open class KeyPreImeEvent
Event that corresponds to an underlying android.widget.EditText#onKeyPreIme().
Link copied to clipboard
open class KeyUpEvent
Event that corresponds to an underlying android.widget.EditText#onKeyUp().
Link copied to clipboard
A Factory used to create RunnableHandlers in RecyclerBinder.
Link copied to clipboard
An implementation of this interface will provide the RecyclerBinder with all the information about the RecyclerView layout.
Link copied to clipboard
open class LayoutInfoUtils
Utility class for calculating the wrapped height of given holders.
Link copied to clipboard
An implementation for LayoutInfo to implement linear lists with a .
Link copied to clipboard
Extension of RecyclerView that allows to add more features needed for @
Link copied to clipboard
Extension of NestedScrollView that allows to add more features needed for @.
Link copied to clipboard
A factory used to create LithoViews in RecyclerBinder.
Link copied to clipboard
Extension of ClickableSpan that provides longclick capability in addition to click.
Link copied to clipboard
Mountable CharSequence that is aware when the Text component using this CharSequence is mounted and unmounted.
Link copied to clipboard

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.

Link copied to clipboard
Link copied to clipboard
class PrimitiveImageLayoutData(val width: Int, val height: Int, val matrix: DrawableMatrix? = null)

The layout data required by the Image Primitive to mount, and bind the drawable in the host.

Link copied to clipboard
class ProgressPrimitiveComponent(color: Int = Color.TRANSPARENT, indeterminateDrawable: Drawable? = null, style: Style? = null) : PrimitiveComponent

Renders an infinitely spinning progress bar.

Link copied to clipboard

Renders an infinitely spinning progress bar.

Link copied to clipboard
Link copied to clipboard
open class PTRRefreshEvent
An event that is triggered when a pull-to-refresh action is performed.
Link copied to clipboard
class Recycler @JvmOverloads constructor(val binder: Binder<RecyclerView>, binderStrategy: PrimitiveRecyclerBinderStrategy? = null, hasFixedSize: Boolean = true, isClipToPaddingEnabled: Boolean = true, leftPadding: Int = 0, topPadding: Int = 0, rightPadding: Int = 0, bottomPadding: Int = 0, @ColorInt refreshProgressBarBackgroundColor: Int? = null, @ColorInt refreshProgressBarColor: Int = Color.BLACK, isClipChildrenEnabled: Boolean = true, isNestedScrollingEnabled: Boolean = true, scrollBarStyle: Int = View.SCROLLBARS_INSIDE_OVERLAY, itemDecorations: List<RecyclerView.ItemDecoration>? = null, isHorizontalFadingEdgeEnabled: Boolean = false, isVerticalFadingEdgeEnabled: Boolean = false, isLeftFadingEnabled: Boolean = true, isRightFadingEnabled: Boolean = true, isTopFadingEnabled: Boolean = true, isBottomFadingEnabled: Boolean = true, fadingEdgeLength: Int = 0, edgeFactory: RecyclerView.EdgeEffectFactory? = null, @IdRes recyclerViewId: Int = View.NO_ID, overScrollMode: Int = View.OVER_SCROLL_ALWAYS, contentDescription: CharSequence? = null, itemAnimator: RecyclerView.ItemAnimator? = NoUpdateItemAnimator(), recyclerEventsController: RecyclerEventsController? = null, onScrollListeners: List<RecyclerView.OnScrollListener>? = null, snapHelper: SnapHelper? = null, isPullToRefreshEnabled: Boolean = true, canMeasureRecycler: Boolean = false, touchInterceptor: LithoRecyclerView.TouchInterceptor? = null, onItemTouchListener: RecyclerView.OnItemTouchListener? = null, onRefresh: () -> Unit? = null, sectionsViewLogger: SectionsRecyclerView.SectionsRecyclerViewLogger? = null, excludeFromIncrementalMount: Boolean = false, paddingAdditionDisabled: Boolean = false, onBeforeLayoutListener: LithoRecyclerView.OnBeforeLayoutListener? = null, onAfterLayoutListener: LithoRecyclerView.OnAfterLayoutListener? = null, style: Style? = null) : PrimitiveComponent
Link copied to clipboard
This binder class is used to asynchronously layout Components given a list of Component and attaching them to a Recycler.
Link copied to clipboard
Link copied to clipboard
A delegation that is used to customize the adapter behaviour for the RecyclerView that the RecyclerBinder uses.
Link copied to clipboard
data class RecyclerBinderConfig(val componentsConfiguration: ComponentsConfiguration? = null, val isCircular: Boolean = false, val lithoViewFactory: LithoViewFactory? = null, val hScrollAsyncMode: Boolean = false, val requestMountForPrefetchedItems: Boolean = false, val recyclerViewItemPrefetch: Boolean = false, val itemViewCacheSize: Int = 0, val componentWarmer: ComponentWarmer? = null, val estimatedViewportCount: Int? = null, val layoutHandlerFactory: LayoutHandlerFactory? = null, val rangeRatio: Float = DEFAULT_RANGE_RATIO, val enableStableIds: Boolean? = null, val wrapContent: Boolean = false, val crossAxisWrapMode: CrossAxisWrapMode = CrossAxisWrapMode.NoWrap, val paginationStrategy: Int = RecyclerBinder.PaginationStrategy.DEFAULT)

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.

Link copied to clipboard

This builder is just a helper class for Java clients.

Link copied to clipboard
class RecyclerBinderException @JvmOverloads constructor(message: String, cause: Exception? = null) : RuntimeException
Link copied to clipboard
An implementation of ListUpdateCallback that generates the relevant Components when an item is inserted/updated.
Link copied to clipboard
The ViewHolder that hosts LithoView used by RecyclerBinder
Link copied to clipboard
An controller that can be passed as com.facebook.litho.annotations.Prop to a Recycler component to trigger events from outside the component hierarchy.
Link copied to clipboard
An interface for generating traversing order for a range.
Link copied to clipboard
open class ReMeasureEvent
An event that a RecyclerBinder can trigger to notify the Recycler that it should re-measure.
Link copied to clipboard
open class RemoveSpanEvent
Remove the specified object from the range of text to which it was attached.
Link copied to clipboard
interface RenderInfo
Link copied to clipboard
Holds a mapping of Views inside a Litho hierarchy to related debugging information.
Link copied to clipboard
Helper class to keep track of the different view types that we're rendering using ViewRenderInfo.
Link copied to clipboard
open class ReplaceTextEvent
Replaces the text input text from startIndex to endIndex with the given text.
Link copied to clipboard
Event sent to TextEdit to request focus.
Link copied to clipboard
class RichText(val text: CharSequence, val textStyle: TextStyle? = null, style: Style? = null) : PrimitiveComponent
Link copied to clipboard
Scroll change listener invoked when the scroll position changes.
Link copied to clipboard
open class SectionsDebug
Utilities for sections debugging.
Link copied to clipboard
Wrapper that encapsulates all the features Recycler provides such as sticky header and pull-to-refresh
Link copied to clipboard
Event sent by EditText when the selection (particular case: cursor position) gets changed by user
Link copied to clipboard
Event sent to TextEdit to send accessibility event.
Link copied to clipboard
Use this with TextInput to set the field's current selection.
Link copied to clipboard
open class SetSpanEvent
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.
Link copied to clipboard
open class SetTextEvent
Use this with TextInput to set the field's current text.
Link copied to clipboard

Event sent to TextEdit to make cursor visible.

Link copied to clipboard
open class SnapUtil
Utility class containing snapping related behavior of RecyclerView.
Link copied to clipboard
class Spinner @JvmOverloads constructor(options: List<String>, selectedOption: String, onItemSelected: (String) -> Unit, style: Style = Style, @ColorInt selectedTextColor: Int = -0x22000000, selectedTextSize: Float = -1f, caret: Drawable? = null, @LayoutRes itemLayout: Int = android.R.layout.simple_dropdown_item_1line) : KComponent

A simple spinner (dropdown) component. Derived from the standard Android android.widget.Spinner

Link copied to clipboard
Link copied to clipboard
An implementation for LayoutInfo to implement staggered grids with a .
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Enumeration of text alignment values.
Link copied to clipboard
open class TextChangedEvent
Event sent by EditText when the text entered by the user changes.
Link copied to clipboard
A Drawable for mounting text content from a Component.
Link copied to clipboard
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.
Link copied to clipboard
open class TextPastedEvent
Event sent by EditText when the text entered is pasted from clipboard.
Link copied to clipboard
@MountSpec(isPureRender = true, poolSize = 30, canPreallocate = true, events = [TextOffsetOnTouchEvent::class])
open class TextSpec
Component to render text.
Link copied to clipboard
Link copied to clipboard
open class TextureWarmer
A class that schedules a background draw of a Layout or Drawable.
Link copied to clipboard
class TouchableFeedback(content: Component, @ColorInt color: Int = Color.WHITE, @ColorInt highlightColor: Int = Color.LTGRAY) : KComponent

A Component that can wrap another component to add touch feedback via a RippleDrawable background.

Link copied to clipboard
A listener that reacts to touch events on a clickable span.
Link copied to clipboard
A wrapper around RenderInfo that also stores TreeProps used for rendering the component.
Link copied to clipboard

Enum for setting vertical gravity of a component. Currently used to design where to vertically align text in a text component.

Link copied to clipboard
@MountSpec(hasChildLithoViews = true, isPureRender = true)
open class VerticalScrollComponentSpec
Component that wraps another component, allowing it to be vertically scrollable.
Link copied to clipboard
A controller that can be passed as com.facebook.litho.annotations.Prop to a to trigger events from outside the component hierarchy.
Link copied to clipboard
Link copied to clipboard
interface ViewportInfo
An implementation of this interface will provide both the 's current visible views position and the total number of items in its androidx.recyclerview.widget.RecyclerView.Adapter.
Link copied to clipboard
RenderInfo that can render views.
Link copied to clipboard
open class WidgetAttributes
Collection of the AttributeKey that are used across Litho's widgets.