LithoView
Types
Properties
Sets a focus change listener on this host.
Sets a touch listener on this host.
An EventHandler that will be invoked when ComponentHost.onInterceptTouchEvent is called.
Functions
Manually adds a View as a child of this ComponentHost for the purposes of testing. This should only be used for tests as this is not safe and will likely cause weird crashes if used in a production environment.
Add view tags to this host.
Hosts are guaranteed to have only one accessible component in them due to the way the view hierarchy is constructed in LayoutState. There might be other non-accessible components in the same hosts such as a background/foreground component though. This is why this method iterates over all mount items in order to find the accessible one.
Sets a long click listener on this host.
Returns the Drawables associated with this ComponentHost for animations, for example the background Drawable and/or the drawable that otherwise has a transitionKey on it that has caused it to be hosted in this ComponentHost.
This is a helper method to get all the text (as CharSequence) that is contained inside this ComponentHost.
When a ViewGroup gets a child with duplicateParentState=true added to it, it forever sets a flag (FLAG_NOTIFY_CHILDREN_ON_DRAWABLE_STATE_CHANGE) which makes the View crash if it ever has addStatesFromChildren set to true. We track this so we know not to recycle ComponentHosts that have had this flag set.
Invalidates the accessibility tree of this host if an AccessibilityDelegate is set and any children implement virtual views.
Moves the MountItem associated to oldIndex in the newIndex position. This happens when a LithoView needs to re-arrange the internal order of its items. If an item is already present in newIndex the item is guaranteed to be either unmounted or moved to a different index by subsequent calls to either ComponentHost.unmount or ComponentHost.moveItem.
Litho handles adding/removing views automatically using mount/unmount calls. Manually adding/ removing views will mess up Litho's bookkeeping of added views and cause weird crashes down the line.
Litho handles adding/removing views automatically using mount/unmount calls. Manually adding/ removing views will mess up Litho's bookkeeping of added views and cause weird crashes down the line.
Litho handles adding/removing views automatically using mount/unmount calls. Manually adding/ removing views will mess up Litho's bookkeeping of added views and cause weird crashes down the line.
Litho handles adding/removing views automatically using mount/unmount calls. Manually adding/ removing views will mess up Litho's bookkeeping of added views and cause weird crashes down the line.
Litho handles adding/removing views automatically using mount/unmount calls. Manually adding/ removing views will mess up Litho's bookkeeping of added views and cause weird crashes down the line.
Litho handles adding/removing views automatically using mount/unmount calls. Manually adding/ removing views will mess up Litho's bookkeeping of added views and cause weird crashes down the line.
Sets a long click listener on this host.
Sets the transform pivot of a View - used for scale and rotation transforms - to be centered at the given point, expressed as a percentage of the View's width and height. The default pivot point is (50f, 50f).
This method is needed because if the disappearing item ended up being remounted to the root, then the index can be different than the one it was created with.