public final class EditText extends Component
EditText
.
com.facebook.litho.widget.EditTextSpec
Modifier and Type | Class and Description |
---|---|
static class |
EditText.Builder |
Component.ContainerBuilder<T extends Component.ContainerBuilder<T>>
ComponentLifecycle.MountType, ComponentLifecycle.RenderData, ComponentLifecycle.StateContainer, ComponentLifecycle.StateUpdate, ComponentLifecycle.TransitionContainer
mSplitChildrenLayoutInThreadPool
Modifier and Type | Method and Description |
---|---|
Object |
acceptTriggerEvent(EventTrigger eventTrigger,
Object eventState,
Object[] params) |
protected boolean |
canMeasure()
Whether this
ComponentLifecycle is able to measure itself according
to specific size constraints. |
protected boolean |
canPreallocate() |
static void |
clearFocus(ComponentContext c,
String key) |
static void |
clearFocus(EventTrigger trigger) |
static EventTrigger |
clearFocusTrigger(ComponentContext c,
String key) |
static EditText.Builder |
create(ComponentContext context) |
static EditText.Builder |
create(ComponentContext context,
int defStyleAttr,
int defStyleRes) |
protected void |
createInitialState(ComponentContext c) |
static EventHandler |
getKeyUpEventHandler(ComponentContext context) |
ComponentLifecycle.MountType |
getMountType()
This indicates the type of the
Object that will be returned by ComponentLifecycle.mount(com.facebook.litho.ComponentContext, java.lang.Object) . |
static EventHandler |
getSelectionChangedEventHandler(ComponentContext context) |
protected ComponentLifecycle.StateContainer |
getStateContainer() |
static EventHandler |
getTextChangedEventHandler(ComponentContext context) |
protected boolean |
hasState() |
boolean |
isEquivalentTo(Component other)
Compares this component to a different one to check if they are the same
This is used to be able to skip rendering a component again.
|
boolean |
isPureRender() |
protected static void |
lazyUpdateInput(ComponentContext c,
String lazyUpdateValue) |
EditText |
makeShallowCopy() |
protected void |
onBind(ComponentContext c,
Object editText) |
protected Object |
onCreateMountContent(Context c)
Create the object that will be mounted in the
LithoView . |
protected void |
onLoadStyle(ComponentContext c) |
protected void |
onMeasure(ComponentContext c,
ComponentLayout layout,
int widthSpec,
int heightSpec,
Size size) |
protected void |
onMount(ComponentContext c,
Object editText)
Deploy all UI elements representing the final bounds defined in the given
ComponentLayout . |
protected void |
onUnbind(ComponentContext c,
Object editText) |
protected void |
onUnmount(ComponentContext c,
Object editText)
Unload UI elements associated with this component.
|
protected int |
poolSize() |
void |
recordEventTrigger(EventTriggersContainer container) |
static void |
requestFocus(ComponentContext c,
String key) |
static void |
requestFocus(EventTrigger trigger) |
static EventTrigger |
requestFocusTrigger(ComponentContext c,
String key) |
protected void |
transferState(ComponentContext context,
ComponentLifecycle.StateContainer _prevStateContainer)
|
protected static void |
updateInput(ComponentContext c,
String newInput) |
protected static void |
updateInputAsync(ComponentContext c,
String newInput) |
protected static void |
updateInputSync(ComponentContext c,
String newInput) |
canResolve, clearCachedLayout, copyInterStageImpl, getEventDispatcher, getId, getOrCreateCommonProps, getScopedContext, getSimpleName, measure, registerWorkingRange, releaseCachedLayout, setScopedContext, updateInternalChildState, updateInternalChildState, willRender
acquireDiff, acquireOutput, applyPreviousRenderData, callsShouldUpdateOnMount, canMountIncrementally, createMountContent, dispatchErrorEvent, dispatchErrorEvent, dispatchOnEnteredRange, dispatchOnEvent, dispatchOnExitedRange, getEventTrigger, getExtraAccessibilityNodeAt, getExtraAccessibilityNodesCount, getTreePropsForChildren, implementsAccessibility, implementsExtraAccessibilityNodes, isMountSizeDependent, needsPreviousRenderData, newEventHandler, newEventHandler, newEventTrigger, onBoundsDefined, onCreateLayout, onCreateLayoutWithSizeSpec, onCreateMountContentPool, onCreateTransition, onError, onMeasureBaseline, onPopulateAccessibilityNode, onPopulateExtraAccessibilityNode, onPrepare, populateTreeProps, recordRenderData, releaseDiff, releaseOutput, resolve, shouldAlwaysRemeasure, shouldUpdate, shouldUseDisplayList
protected ComponentLifecycle.StateContainer getStateContainer()
getStateContainer
in class Component
public boolean isEquivalentTo(Component other)
Component
Object.equals(Object)
so we can optimize the code better over time since we don't have
to adhere to the contract required for a equals method.isEquivalentTo
in class Component
other
- the component to compare topublic EditText makeShallowCopy()
makeShallowCopy
in class Component
protected void onLoadStyle(ComponentContext c)
onLoadStyle
in class ComponentLifecycle
protected void onMeasure(ComponentContext c, ComponentLayout layout, int widthSpec, int heightSpec, Size size)
onMeasure
in class ComponentLifecycle
protected boolean canMeasure()
ComponentLifecycle
ComponentLifecycle
is able to measure itself according
to specific size constraints.canMeasure
in class ComponentLifecycle
protected Object onCreateMountContent(Context c)
ComponentLifecycle
LithoView
.onCreateMountContent
in class ComponentLifecycle
c
- The Context
to be used to create the content.protected void onMount(ComponentContext c, Object editText)
ComponentLifecycle
ComponentLayout
. Return either a Drawable
or a View
or null
to be
mounted.onMount
in class ComponentLifecycle
c
- The ComponentContext
to mount the component into.protected void onBind(ComponentContext c, Object editText)
onBind
in class ComponentLifecycle
protected void onUnbind(ComponentContext c, Object editText)
onUnbind
in class ComponentLifecycle
protected void onUnmount(ComponentContext c, Object editText)
ComponentLifecycle
onUnmount
in class ComponentLifecycle
c
- The Context
for this mount operation.editText
- The Drawable
or View
mounted by this component.protected void createInitialState(ComponentContext c)
createInitialState
in class ComponentLifecycle
public ComponentLifecycle.MountType getMountType()
ComponentLifecycle
Object
that will be returned by ComponentLifecycle.mount(com.facebook.litho.ComponentContext, java.lang.Object)
.getMountType
in class ComponentLifecycle
ComponentLifecycle.MountType
protected int poolSize()
poolSize
in class ComponentLifecycle
protected boolean canPreallocate()
canPreallocate
in class ComponentLifecycle
public boolean isPureRender()
isPureRender
in class ComponentLifecycle
public static EventHandler getTextChangedEventHandler(ComponentContext context)
public static EventHandler getSelectionChangedEventHandler(ComponentContext context)
public static EventHandler getKeyUpEventHandler(ComponentContext context)
public static EventTrigger requestFocusTrigger(ComponentContext c, String key)
public static EventTrigger clearFocusTrigger(ComponentContext c, String key)
public static void requestFocus(ComponentContext c, String key)
public static void requestFocus(EventTrigger trigger)
public static void clearFocus(ComponentContext c, String key)
public static void clearFocus(EventTrigger trigger)
public Object acceptTriggerEvent(EventTrigger eventTrigger, Object eventState, Object[] params)
acceptTriggerEvent
in interface EventTriggerTarget
acceptTriggerEvent
in class ComponentLifecycle
public void recordEventTrigger(EventTriggersContainer container)
recordEventTrigger
in interface HasEventTrigger
recordEventTrigger
in class Component
protected boolean hasState()
hasState
in class ComponentLifecycle
protected void transferState(ComponentContext context, ComponentLifecycle.StateContainer _prevStateContainer)
ComponentLifecycle
transferState
in class ComponentLifecycle
protected static void updateInput(ComponentContext c, String newInput)
protected static void updateInputAsync(ComponentContext c, String newInput)
protected static void updateInputSync(ComponentContext c, String newInput)
protected static void lazyUpdateInput(ComponentContext c, String lazyUpdateValue)
public static EditText.Builder create(ComponentContext context)
public static EditText.Builder create(ComponentContext context, int defStyleAttr, int defStyleRes)