public final class Spinner extends SpecGeneratedComponent
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 |
SpecGeneratedComponent.TransitionContainer
Component.ContainerBuilder<T extends Component.ContainerBuilder<T>>, Component.MountType, Component.RenderData
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) |
acceptTriggerEvent, acceptTriggerEventImpl, applyPreviousRenderData, bindDynamicProp, canPreallocate, copyInterStageImpl, copyPrepareInterStageImpl, createContent, createInterStagePropsContainer, createPoolableContent, createPrepareInterStagePropsContainer, createRecyclingPool, dispatchOnEnteredRange, dispatchOnExitedRange, getExtraAccessibilityNodeAt, getExtraAccessibilityNodesCount, getInterStagePropsContainer, getPoolableContentType, getPrepareInterStagePropsContainer, getSimpleName, getSimpleNameDelegate, getTreePropsForChildren, hasAttachDetachCallback, hasOwnErrorHandler, implementsAccessibility, implementsExtraAccessibilityNodes, isMountSizeDependent, isRecyclingDisabled, needsPreviousRenderData, onAttached, onBind, onBoundsDefined, onCreateLayoutWithSizeSpec, onCreateMountContentPool, onDetached, onError, onMeasure, onMeasureBaseline, onMount, onPrepare, onUnbind, onUnmount, poolSize, populateTreeProps, prepare, recordEventTrigger, recordRenderData, render, shouldAlwaysRemeasure, usesLocalStateContainer
canMeasure, clone, createMountContent, dispatchErrorEvent, dispatchOnEvent, equals, excludeFromIncrementalMount, getCommonProps, getDynamicProps, getErrorHandler, getEventDispatcher, getEventTrigger, getEventTrigger, getHandle, getMountType, getTreePropFromParent, getTypeId, hasChildLithoViews, hasClickHandlerSet, hashCode, implementsShouldUpdate, isEqualivalentTreeProps, isEquivalentCommonProps, isEquivalentProps, isEquivalentTo, isEquivalentTo, isLayoutSpecWithSizeSpec, isPureRender, isPureRender, measure, measure, measureMightNotCacheInternalNode, newEventHandler, newEventTrigger, newEventTrigger, onCreateMountContent, onCreateTransition, onLoadStyle, onPopulateAccessibilityNode, onPopulateExtraAccessibilityNode, registerWorkingRange, resolve, retrieveValue, shouldUpdate, toString, willRender
protected com.facebook.litho.widget.Spinner.SpinnerStateContainer createStateContainer()
createStateContainer
in class SpecGeneratedComponent
public Spinner makeShallowCopy()
makeShallowCopy
in class Component
protected void createInitialState(ComponentContext _0)
createInitialState
in class SpecGeneratedComponent
protected Component onCreateLayout(ComponentContext c)
SpecGeneratedComponent
ComponentLayout
representing the layout structure of the Component
and its sub-components.onCreateLayout
in class SpecGeneratedComponent
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 Component
protected boolean hasState()
hasState
in class SpecGeneratedComponent
protected void transferState(StateContainer _prevStateContainer, StateContainer _nextStateContainer)
Component
transferState
in class Component
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)