Class Spinner
- All Implemented Interfaces:
Drawable.Callback
,ViewManager
,ViewParent
-
Nested Class Summary
Nested classes/interfaces inherited from class icyllis.modernui.widget.AdapterView
AdapterView.AdapterContextMenuInfo, AdapterView.OnItemClickListener, AdapterView.OnItemLongClickListener, AdapterView.OnItemSelectedListener
Nested classes/interfaces inherited from class icyllis.modernui.view.ViewGroup
ViewGroup.LayoutParams, ViewGroup.MarginLayoutParams
Nested classes/interfaces inherited from class icyllis.modernui.view.View
View.DragShadow, View.Focusable, View.FocusableMode, View.FocusDirection, View.FocusRealDirection, View.LayoutDir, View.NestedScrollType, View.OnAttachStateChangeListener, View.OnClickListener, View.OnContextClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnScrollChangeListener, View.OnTouchListener, View.ResolvedLayoutDir, View.ScrollAxis, View.ScrollBarStyle, View.ScrollIndicators, View.TextAlignment, View.Visibility
-
Field Summary
Fields inherited from class icyllis.modernui.widget.AdapterView
INVALID_POSITION, INVALID_ROW_ID, ITEM_VIEW_TYPE_HEADER_OR_FOOTER, ITEM_VIEW_TYPE_IGNORE
Fields inherited from class icyllis.modernui.view.ViewGroup
CLIP_TO_PADDING_MASK, FLAG_DISALLOW_INTERCEPT, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS
Fields inherited from class icyllis.modernui.view.View
ALPHA, BOTTOM, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLE, FOCUSABLE_AUTO, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, INVISIBLE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, LAYOUT_DIRECTION_UNDEFINED, LEFT, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, mPaddingBottom, mPaddingLeft, mPaddingRight, mPaddingTop, mScrollX, mScrollY, NO_ID, NOT_FOCUSABLE, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, RIGHT, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLL_X, SCROLL_Y, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TOP, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, TYPE_NON_TOUCH, TYPE_TOUCH, VIEW_MARKER, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Return the offset of the widget's text baseline from the widget's top boundary.int
Get the configured horizontal offset in pixels for the spinner's popup window of choices.int
Get the configured vertical offset in pixels for the spinner's popup window of choices.int
Get the configured width of the spinner's popup window of choices in pixels.int
Describes how the selected item view is positioned.Get the background drawable for the spinner's popup window of choices.protected void
This is called when the view is detached from a window.protected void
onLayout
(boolean changed, int l, int t, int r, int b) Called fromView.layout(int, int, int, int)
when this view should assign a size and position to each of its children.protected void
onMeasure
(int widthMeasureSpec, int heightMeasureSpec) Figure out the dimensions of this Spinner.onResolvePointerIcon
(MotionEvent event) Returns the pointer icon for the motion event, or null if it doesn't specify the icon.boolean
onTouchEvent
(MotionEvent event) Implement this method to handle touch screen motion events.boolean
Call this view's OnClickListener, if it is defined.void
setAdapter
(SpinnerAdapter adapter) Sets theSpinnerAdapter
used to provide the data which backs this Spinner.void
setDropDownHorizontalOffset
(int pixels) Set a horizontal offset in pixels for the spinner's popup window of choices.void
setDropDownVerticalOffset
(int pixels) Set a vertical offset in pixels for the spinner's popup window of choices.void
setDropDownWidth
(int pixels) Set the width of the spinner's popup window of choices in pixels.void
setEnabled
(boolean enabled) Set the enabled state of this view.void
setGravity
(int gravity) Describes how the selected item view is positioned.void
A spinner does not support item click events.void
setPopupBackgroundDrawable
(Drawable background) Set the background drawable for the spinner's popup window of choices.Methods inherited from class icyllis.modernui.widget.AbsSpinner
generateDefaultLayoutParams, getAdapter, getCount, getSelectedView, pointToPosition, requestLayout, setSelection, setSelection
Methods inherited from class icyllis.modernui.widget.AdapterView
addView, addView, addView, addView, getEmptyView, getFirstVisiblePosition, getItemAtPosition, getItemIdAtPosition, getLastVisiblePosition, getOnItemClickListener, getOnItemLongClickListener, getOnItemSelectedListener, getPositionForView, getSelectedItem, getSelectedItemId, getSelectedItemPosition, performItemClick, removeAllViews, removeView, removeViewAt, setEmptyView, setFocusable, setFocusableInTouchMode, setOnClickListener, setOnItemLongClickListener, setOnItemSelectedListener
Methods inherited from class icyllis.modernui.view.ViewGroup
addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addTransientView, addView, addViewInLayout, addViewInLayout, attachViewToParent, bringChildToFront, checkLayoutParams, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchTouchEvent, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewByPredicateTraversal, findViewTraversal, focusableViewAvailable, focusSearch, generateLayoutParams, getChildAt, getChildCount, getChildDrawingOrder, getChildDrawingOrder, getChildMeasureSpec, getChildVisibleRect, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutTransition, getNestedScrollAxes, getTouchscreenBlocksFocus, getTransientView, getTransientViewCount, getTransientViewIndex, hasBooleanFlag, hasFocus, hasTransientState, indexOfChild, internalSetPadding, isChildrenDrawingOrderEnabled, isLayoutSuppressed, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, offsetChildrenTopAndBottom, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onChildVisibilityChanged, onCreateDrawableState, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onSetLayoutParams, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, removeAllViewsInLayout, removeDetachedView, removeTransientView, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestTransitionStart, resetResolvedDrawables, resolveDrawables, resolveLayoutDirection, resolveLayoutParams, resolvePadding, resolveRtlPropertiesIfNeeded, resolveTextAlignment, resolveTextDirection, restoreDefaultFocus, setAddStatesFromChildren, setBooleanFlag, setChildrenDrawingOrderEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutTransition, setTouchscreenBlocksFocus, setTransitionGroup, shouldDelayChildPressedState, showContextMenuForChild, startActionModeForChild, startViewTransition, suppressLayout, transformPointToViewLocal, updateViewLayout
Methods inherited from class icyllis.modernui.view.View
addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, awakenScrollBars, awakenScrollBars, callOnClick, cancelLongPress, cancelPendingInputEvents, canReceivePointerEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createContextMenu, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPointerEvent, dp, draw, drawableHotspotChanged, findViewById, findViewByPredicate, findViewByPredicateInsideOut, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAlpha, getAnimationMatrix, getBackground, getBottom, getBoundsOnScreen, getBoundsOnScreen, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingRect, getElevation, getFadingEdge, getFadingEdgeLength, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalScrollbarHeight, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getInverseMatrix, getKeyDispatcherState, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOnLongClickListener, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getPivotX, getPivotY, getRawLayoutDirection, getRawTextAlignment, getRawTextDirection, getRevealOnFocusHint, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getTag, getTextAlignment, getTextDirection, getTooltipText, getTooltipView, getTop, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewRoot, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowVisibility, getX, getY, getZ, handleScrollBarDragging, hasExplicitFocusable, hasFocusable, hasIdentityMatrix, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasTranslationTransientState, hasWindowFocus, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForegroundInsidePadding, isHapticFeedbackEnabled, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInLayout, isInScrollingContainer, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionInherited, isLayoutDirectionResolved, isLayoutRequested, isLayoutRtl, isLongClickable, isNestedScrollingEnabled, isPaddingRelative, isPivotSet, isPressed, isRootNamespace, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentInherited, isTextAlignmentResolved, isTextDirectionInherited, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVerticalScrollBarHidden, keyboardNavigationClusterSearch, mapRectFromViewToScreenCoords, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAttachedToWindow, onCancelPendingInputEvents, onCreateContextMenu, onDragEvent, onDraw, onDrawForeground, onDrawScrollBars, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onKeyDown, onKeyShortcut, onKeyUp, onOverScrolled, onResolveDrawables, onRtlPropertiesChanged, onScrollChanged, onSizeChanged, onStartTemporaryDetach, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowVisibilityChanged, overScrollBy, performButtonActionOnTouchDown, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, pointInView, post, postDelayed, postInvalidate, postInvalidateDelayed, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestFocus, requestFocus, requestRectangleOnScreen, requestRectangleOnScreen, requireViewById, resetPivot, resolveSize, resolveSizeAndState, scheduleDrawable, scrollBy, scrollTo, setActivated, setAlpha, setAnimationMatrix, setBackground, setBottom, setClickable, setContextClickable, setDuplicateParentStateEnabled, setElevation, setFocusable, setFocusedByDefault, setFocusedInCluster, setForeground, setForegroundGravity, setFrame, setHapticFeedbackEnabled, setHasTransientState, setHasTranslationTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setIsRootNamespace, setKeyboardNavigationCluster, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setVisibility, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, sp, startActionMode, startActionMode, startDragAndDrop, startNestedScroll, stopNestedScroll, toGlobalMotionEvent, toLocalMotionEvent, toString, transformFromViewToWindowSpace, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotDraw
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface icyllis.modernui.view.ViewParent
canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, keyboardNavigationClusterSearch
-
Constructor Details
-
Spinner
-
-
Method Details
-
setPopupBackgroundDrawable
Set the background drawable for the spinner's popup window of choices.- Parameters:
background
- Background drawable
-
getPopupBackground
Get the background drawable for the spinner's popup window of choices.- Returns:
- Background drawable
-
setDropDownVerticalOffset
public void setDropDownVerticalOffset(int pixels) Set a vertical offset in pixels for the spinner's popup window of choices.- Parameters:
pixels
- Vertical offset in pixels
-
getDropDownVerticalOffset
public int getDropDownVerticalOffset()Get the configured vertical offset in pixels for the spinner's popup window of choices.- Returns:
- Vertical offset in pixels
-
setDropDownHorizontalOffset
public void setDropDownHorizontalOffset(int pixels) Set a horizontal offset in pixels for the spinner's popup window of choices.- Parameters:
pixels
- Horizontal offset in pixels
-
getDropDownHorizontalOffset
public int getDropDownHorizontalOffset()Get the configured horizontal offset in pixels for the spinner's popup window of choices.- Returns:
- Horizontal offset in pixels
-
setDropDownWidth
public void setDropDownWidth(int pixels) Set the width of the spinner's popup window of choices in pixels. This value may also be set toViewGroup.LayoutParams.MATCH_PARENT
to match the width of the Spinner itself, orViewGroup.LayoutParams.WRAP_CONTENT
to wrap to the measured size of contained dropdown list items.- Parameters:
pixels
- Width in pixels, WRAP_CONTENT, or MATCH_PARENT
-
getDropDownWidth
public int getDropDownWidth()Get the configured width of the spinner's popup window of choices in pixels. The returned value may also beViewGroup.LayoutParams.MATCH_PARENT
meaning the popup window will match the width of the Spinner itself, orViewGroup.LayoutParams.WRAP_CONTENT
to wrap to the measured size of contained dropdown list items.- Returns:
- Width in pixels, WRAP_CONTENT, or MATCH_PARENT
-
setEnabled
public void setEnabled(boolean enabled) Description copied from class:View
Set the enabled state of this view. The interpretation of the enabled state varies by subclass.- Overrides:
setEnabled
in classView
- Parameters:
enabled
- True if this view is enabled, false otherwise.
-
setGravity
public void setGravity(int gravity) Describes how the selected item view is positioned. Currently, only the horizontal component is used. The default isGravity.START
.- Parameters:
gravity
- SeeGravity
-
getGravity
public int getGravity()Describes how the selected item view is positioned. The default isGravity.START
.- Returns:
- A
Gravity
value
-
setAdapter
Sets theSpinnerAdapter
used to provide the data which backs this Spinner.Spinner overrides
Adapter.getViewTypeCount()
on the Adapter associated with this view. CallinggetItemViewType(int)
on the object returned fromAbsSpinner.getAdapter()
will always return 0. CallinggetViewTypeCount()
will always return 1. Attempting to set an adapter with more than one view type will throw anIllegalArgumentException
.- Overrides:
setAdapter
in classAbsSpinner
- Parameters:
adapter
- the adapter to set- Throws:
IllegalArgumentException
- if the adapter has more than one view type- See Also:
-
getBaseline
public int getBaseline()Description copied from class:View
Return the offset of the widget's text baseline from the widget's top boundary. If this widget does not support baseline alignment, this method returns -1.
- Overrides:
getBaseline
in classView
- Returns:
- the offset of the baseline within the widget's bounds or -1 if baseline alignment is not supported
-
onDetachedFromWindow
protected void onDetachedFromWindow()Description copied from class:View
This is called when the view is detached from a window. At this point it no longer has a surface for drawing.- Overrides:
onDetachedFromWindow
in classAdapterView<SpinnerAdapter>
- See Also:
-
setOnItemClickListener
A spinner does not support item click events. Calling this method will raise an exception.
Instead use
AdapterView.setOnItemSelectedListener(icyllis.modernui.widget.AdapterView.OnItemSelectedListener)
.- Overrides:
setOnItemClickListener
in classAdapterView<SpinnerAdapter>
- Parameters:
l
- this listener will be ignored
-
onTouchEvent
Description copied from class:View
Implement this method to handle touch screen motion events.If this method is used to detect click actions, it is recommended that the actions be performed by implementing and calling
View.performClick()
. This will ensure consistent system behavior.- Overrides:
onTouchEvent
in classView
- Parameters:
event
- the touch event- Returns:
true
if the event was handled by the view,false
otherwise
-
onMeasure
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) Description copied from class:AbsSpinner
Figure out the dimensions of this Spinner. The width comes from the widthMeasureSpec as Spinners can't have their width set to UNSPECIFIED. The height is based on the height of the selected item plus padding.- Overrides:
onMeasure
in classAbsSpinner
- Parameters:
widthMeasureSpec
- width measure specification imposed by the parentMeasureSpec
heightMeasureSpec
- height measure specification imposed by the parentMeasureSpec
- See Also:
-
onLayout
protected void onLayout(boolean changed, int l, int t, int r, int b) Description copied from class:View
Called fromView.layout(int, int, int, int)
when this view should assign a size and position to each of its children.Derived classes with children should override this method and call layout on each of their children.
- Overrides:
onLayout
in classAdapterView<SpinnerAdapter>
- Parameters:
changed
- This is a new size or position for this viewl
- Left position, relative to parentt
- Top position, relative to parentr
- Right position, relative to parentb
- Bottom position, relative to parent- See Also:
-
performClick
public boolean performClick()Description copied from class:View
Call this view's OnClickListener, if it is defined. Performs all normal actions associated with clicking: reporting accessibility event, playing a sound, etc.- Overrides:
performClick
in classView
- Returns:
- True there was an assigned OnClickListener that was called, false otherwise is returned.
-
onResolvePointerIcon
Description copied from class:View
Returns the pointer icon for the motion event, or null if it doesn't specify the icon. The default implementation does not care the location or event types, but some subclasses may use it (such as WebViews).- Overrides:
onResolvePointerIcon
in classViewGroup
- Parameters:
event
- The MotionEvent from a mouse- See Also:
-