public final class Spinner extends Component
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
bindDynamicProp, canResolve, clearCachedLayout, copyInterStageImpl, getCommonProps, getDynamicProps, getEventDispatcher, getHandle, getId, getKey, getScopedContext, getSimpleName, getSimpleNameDelegate, hasBackgroundSet, hasClickHandlerSet, isEquivalentTo, measure, measureMightNotCacheInternalNode, recordEventTrigger, registerWorkingRange, retrieveValue, setScopedContext, updateInternalChildState, willRender
acceptTriggerEvent, applyPreviousRenderData, callsShouldUpdateOnMount, canMeasure, canPreallocate, createMountContent, dispatchErrorEvent, dispatchErrorEvent, dispatchOnEnteredRange, dispatchOnExitedRange, getEventTrigger, getEventTrigger, getExtraAccessibilityNodeAt, getExtraAccessibilityNodesCount, getMountType, getTreePropsForChildren, hasAttachDetachCallback, hasChildLithoViews, implementsAccessibility, implementsExtraAccessibilityNodes, isLayoutSpecWithSizeSpecCheck, isMountSizeDependent, isPureRender, needsPreviousRenderData, newEventHandler, 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, shouldUseGlobalPool
protected StateContainer getStateContainer()
getStateContainer
in class Component
public Spinner makeShallowCopy()
makeShallowCopy
in class Component
protected void createInitialState(ComponentContext c)
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 getItemSelectedEventHandler(ComponentContext context)
public static EventHandler<ClickEvent> onClick(ComponentContext c)
public Object dispatchOnEvent(EventHandler eventHandler, Object eventState)
dispatchOnEvent
in interface EventDispatcher
dispatchOnEvent
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, String newSelection)
protected static void updateSelectionAsync(ComponentContext c, String newSelection)
protected static void updateSelectionSync(ComponentContext c, 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)