public final class Spinner extends Component
android.widget.Spinner
Additionally added logic to flip the caret vertically once menu is shown.
If no optional values are provided the component will look like it's material design counterpart.
com.facebook.litho.widget.SpinnerSpec
Modifier and Type | Class and Description |
---|---|
static class |
Spinner.Builder |
Component.ContainerBuilder<T extends Component.ContainerBuilder<T>>
ComponentLifecycle.MountType, ComponentLifecycle.RenderData, ComponentLifecycle.TransitionContainer
Modifier and Type | Method and Description |
---|---|
static Spinner.Builder |
create(ComponentContext context) |
static Spinner.Builder |
create(ComponentContext context,
int defStyleAttr,
int defStyleRes) |
protected void |
createInitialState(ComponentContext _0) |
protected com.facebook.litho.widget.Spinner.SpinnerStateContainer |
createStateContainer() |
protected java.lang.Object |
dispatchOnEventImpl(EventHandler eventHandler,
java.lang.Object eventState) |
static EventHandler<ItemSelectedEvent> |
getItemSelectedEventHandler(ComponentContext context) |
protected boolean |
hasState() |
Spinner |
makeShallowCopy() |
static EventHandler<ClickEvent> |
onClick(ComponentContext c) |
protected Component |
onCreateLayout(ComponentContext c)
Generate a tree of
ComponentLayout representing the layout structure of the Component and its sub-components. |
protected void |
transferState(StateContainer _prevStateContainer,
StateContainer _nextStateContainer)
|
protected static void |
updateIsShowingDropDown(ComponentContext c,
boolean isShowing) |
protected static void |
updateIsShowingDropDownAsync(ComponentContext c,
boolean isShowing) |
protected static void |
updateIsShowingDropDownSync(ComponentContext c,
boolean isShowing) |
protected static void |
updateSelection(ComponentContext c,
java.lang.String newSelection) |
protected static void |
updateSelectionAsync(ComponentContext c,
java.lang.String newSelection) |
protected static void |
updateSelectionSync(ComponentContext c,
java.lang.String newSelection) |
bindDynamicProp, canResolve, clearCachedLayout, copyInterStageImpl, createInterStagePropsContainer, getCommonProps, getDynamicProps, getErrorHandler, getEventDispatcher, getInterStagePropsContainer, getScopedContext, getSimpleName, getSimpleNameDelegate, getStateContainer, hasClickHandlerSet, isEquivalentTo, markLayoutStarted, measure, measureMightNotCacheInternalNode, recordEventTrigger, registerWorkingRange, retrieveValue, setInterStagePropsContainer, setScopedContext, setStateContainer, toString, updateInternalChildState, willRender
acceptTriggerEvent, acceptTriggerEventImpl, applyPreviousRenderData, callsShouldUpdateOnMount, canMeasure, canPreallocate, createMountContent, dispatchErrorEvent, dispatchErrorEvent, dispatchOnEnteredRange, dispatchOnEvent, dispatchOnExitedRange, getEventTrigger, getEventTrigger, getExtraAccessibilityNodeAt, getExtraAccessibilityNodesCount, getMountType, getTreePropsForChildren, hasAttachDetachCallback, hasChildLithoViews, hasOwnErrorHandler, implementsAccessibility, implementsExtraAccessibilityNodes, isLayoutSpecWithSizeSpecCheck, isMountSizeDependent, isPureRender, needsPreviousRenderData, newEventHandler, newEventTrigger, newEventTrigger, onAttached, onBind, onBoundsDefined, onCreateLayoutWithSizeSpec, onCreateMountContent, onCreateMountContentPool, onCreateTransition, onDetached, onError, onLoadStyle, onMeasure, onMeasureBaseline, onMount, onPopulateAccessibilityNode, onPopulateExtraAccessibilityNode, onPrepare, onShouldCreateLayoutWithNewSizeSpec, onUnbind, onUnmount, poolSize, populateTreeProps, recordRenderData, resolve, shouldAlwaysRemeasure, shouldUpdate
protected com.facebook.litho.widget.Spinner.SpinnerStateContainer createStateContainer()
createStateContainer
in class Component
public Spinner makeShallowCopy()
makeShallowCopy
in class Component
protected void createInitialState(ComponentContext _0)
createInitialState
in class ComponentLifecycle
protected Component onCreateLayout(ComponentContext c)
ComponentLifecycle
ComponentLayout
representing the layout structure of the Component
and its sub-components.onCreateLayout
in class ComponentLifecycle
c
- The ComponentContext
to build a ComponentLayout
tree.public static EventHandler<ItemSelectedEvent> getItemSelectedEventHandler(ComponentContext context)
public static EventHandler<ClickEvent> onClick(ComponentContext c)
protected java.lang.Object dispatchOnEventImpl(EventHandler eventHandler, java.lang.Object eventState)
dispatchOnEventImpl
in class ComponentLifecycle
protected boolean hasState()
hasState
in class ComponentLifecycle
protected void transferState(StateContainer _prevStateContainer, StateContainer _nextStateContainer)
ComponentLifecycle
transferState
in class ComponentLifecycle
protected static void updateSelection(ComponentContext c, java.lang.String newSelection)
protected static void updateSelectionAsync(ComponentContext c, java.lang.String newSelection)
protected static void updateSelectionSync(ComponentContext c, java.lang.String newSelection)
protected static void updateIsShowingDropDown(ComponentContext c, boolean isShowing)
protected static void updateIsShowingDropDownAsync(ComponentContext c, boolean isShowing)
protected static void updateIsShowingDropDownSync(ComponentContext c, boolean isShowing)
public static Spinner.Builder create(ComponentContext context)
public static Spinner.Builder create(ComponentContext context, int defStyleAttr, int defStyleRes)