ComponentContext
A Context subclass for use within the Components framework. Contains extra bookkeeping information used internally in the library.
Constructors
Link copied to clipboard
This constructors takes a Context.
constructor(context: Context, @Nullable lithoConfiguration: LithoConfiguration, @Nullable treePropContainer: TreePropContainer)
Functions
Link copied to clipboard
Link copied to clipboard
Calculates a returns a unique ID for a given component key and output type.
Link copied to clipboard
Link copied to clipboard
open fun createScopedComponentContextWithStateForTest(parent: ComponentContext, component: Component, key: String): ComponentContext
Link copied to clipboard
Resolve a dimen resource ID as a Dimen value.
Link copied to clipboard
inline fun ComponentContext.drawableAttr(@AttrRes id: Int, @DrawableRes defResId: Int = 0): Drawable
Retrieve a android.graphics.drawable.Drawable, corresponding to an attribute resource ID, as a Drawable instance. If given attribute ID can not be found, default Drawable resource ID defResId is used.
Link copied to clipboard
Retrieve a android.graphics.drawable.Drawable for a resource ID as a Drawable instance.
Link copied to clipboard
Link copied to clipboard
A utility function to find the View with a given tag under the current Component's LithoView.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Obtain a copy of the tree props currently held by this context.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Checks if incremental mount is enabled given a ComponentContext, so you can throw an error if you require that incremental mount is enabled (e.g.
Link copied to clipboard
Link copied to clipboard
Creates a new ComponentContext based on the given ComponentContext, propagating log tag, logger, and tree props.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun ComponentContext.quantityStringRes(@PluralsRes id: Int, quantity: Int, vararg formatArgs: Any): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
For test usage.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun ComponentContext.stringAttr(@AttrRes attrResId: Int, @StringRes defResId: Int = 0): String
Return a string for an attribute resource ID.
Link copied to clipboard
Return a string for a resource ID.
Return a string for a resource ID, substituting the format arguments with arg.
Return a string for a resource ID, substituting the format arguments with formatArgs.
Link copied to clipboard
Notify the Component Tree that it needs to asynchronously perform a state update.
Link copied to clipboard
Link copied to clipboard
Notify the Component Tree that it needs to synchronously perform a state update.
Link copied to clipboard