android.widget
Class Gallery

java.lang.Object
  extended by android.view.View
      extended by android.view.ViewGroup
          extended by android.widget.AdapterView<SpinnerAdapter>
              extended by android.widget.AbsSpinner
                  extended by android.widget.Gallery
All Implemented Interfaces:
Drawable.Callback, AccessibilityEventSource, GestureDetector.OnGestureListener, KeyEvent.Callback, ViewManager, ViewParent

public class Gallery
extends AbsSpinner
implements GestureDetector.OnGestureListener


Nested Class Summary
static class Gallery.LayoutParams
           
 
Nested classes/interfaces inherited from class android.widget.AdapterView
AdapterView.AdapterContextMenuInfo, AdapterView.OnItemClickListener, AdapterView.OnItemLongClickListener, AdapterView.OnItemSelectedListener
 
Nested classes/interfaces inherited from class android.view.ViewGroup
ViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListener
 
Nested classes/interfaces inherited from class android.view.View
View.AccessibilityDelegate, View.BaseSavedState, View.DragShadowBuilder, View.MeasureSpec, View.OnAttachStateChangeListener, View.OnClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnSystemUiVisibilityChangeListener, View.OnTouchListener
 
Field Summary
 
Fields inherited from class android.widget.AdapterView
INVALID_POSITION, INVALID_ROW_ID, ITEM_VIEW_TYPE_HEADER_OR_FOOTER, ITEM_VIEW_TYPE_IGNORE
 
Fields inherited from class android.view.ViewGroup
CLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
 
Fields inherited from class android.view.View
ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, 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, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, 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, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, 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_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, TRANSLATION_X, TRANSLATION_Y, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y
 
Constructor Summary
Gallery(Context context)
           
Gallery(Context context, AttributeSet attrs)
           
Gallery(Context context, AttributeSet attrs, int defStyle)
           
 
Method Summary
protected  boolean checkLayoutParams(ViewGroup.LayoutParams p)
           
protected  int computeHorizontalScrollExtent()
           
protected  int computeHorizontalScrollOffset()
           
protected  int computeHorizontalScrollRange()
           
 boolean dispatchKeyEvent(KeyEvent event)
           
protected  void dispatchSetPressed(boolean pressed)
           
 void dispatchSetSelected(boolean selected)
           
protected  ViewGroup.LayoutParams generateDefaultLayoutParams()
           
 ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs)
           
protected  ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p)
           
protected  int getChildDrawingOrder(int childCount, int i)
           
protected  boolean getChildStaticTransformation(View child, Transformation t)
           
protected  ContextMenu.ContextMenuInfo getContextMenuInfo()
           
 boolean onDown(MotionEvent e)
           
 boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
           
protected  void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect)
           
 boolean onKeyDown(int keyCode, KeyEvent event)
           
 boolean onKeyUp(int keyCode, KeyEvent event)
           
protected  void onLayout(boolean changed, int l, int t, int r, int b)
           
 void onLongPress(MotionEvent e)
           
 boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
           
 void onShowPress(MotionEvent e)
           
 boolean onSingleTapUp(MotionEvent e)
           
 boolean onTouchEvent(MotionEvent event)
           
 void setAnimationDuration(int animationDurationMillis)
           
 void setCallbackDuringFling(boolean shouldCallback)
           
 void setGravity(int gravity)
           
 void setSpacing(int spacing)
           
 void setUnselectedAlpha(float unselectedAlpha)
           
 boolean showContextMenu()
           
 boolean showContextMenuForChild(View originalView)
           
 
Methods inherited from class android.widget.AbsSpinner
getAdapter, getCount, getSelectedView, onMeasure, onRestoreInstanceState, onSaveInstanceState, pointToPosition, requestLayout, setAdapter, setSelection, setSelection
 
Methods inherited from class android.widget.AdapterView
addView, addView, addView, addView, canAnimate, dispatchPopulateAccessibilityEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, getEmptyView, getFirstVisiblePosition, getItemAtPosition, getItemIdAtPosition, getLastVisiblePosition, getOnItemClickListener, getOnItemLongClickListener, getOnItemSelectedListener, getPositionForView, getSelectedItem, getSelectedItemId, getSelectedItemPosition, onDetachedFromWindow, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onRequestSendAccessibilityEvent, performItemClick, removeAllViews, removeView, removeViewAt, setEmptyView, setFocusable, setFocusableInTouchMode, setOnClickListener, setOnItemClickListener, setOnItemLongClickListener, setOnItemSelectedListener
 
Methods inherited from class android.view.ViewGroup
addFocusables, addFocusables, addStatesFromChildren, addTouchables, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, childDrawableStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchSetActivated, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewsWithText, fitSystemWindows, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutTransition, getPersistentDrawingCache, hasFocus, hasFocusable, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAnimationEnd, onAnimationStart, onCreateDrawableState, onInterceptHoverEvent, onInterceptTouchEvent, onRequestFocusInDescendants, recomputeViewAttributes, removeAllViewsInLayout, removeDetachedView, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, resetResolvedLayoutDirection, resetResolvedTextDirection, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPadding, setPersistentDrawingCache, setStaticTransformationsEnabled, shouldDelayChildPressedState, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayout
 
Methods inherited from class android.view.View
addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, cancelLongPress, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, draw, findViewById, findViewWithTag, fitsSystemWindows, focusSearch, forceLayout, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getContentDescription, getContext, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getKeepScreenOn, getKeyDispatcherState, getLayerType, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverScrollMode, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getPivotX, getPivotY, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInTouchMode, isLayoutRequested, isLongClickable, isOpaque, isPaddingOffsetRequired, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAttachedToWindow, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onOverScrolled, onPopulateAccessibilityEvent, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowVisibilityChanged, overScrollBy, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestFocus, requestFocus, requestFocusFromTouch, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setActivated, setAlpha, setAnimation, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setHapticFeedbackEnabled, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setKeepScreenOn, setLayerType, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollbarFadingEnabled, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, startActionMode, startAnimation, startDrag, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDraw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface android.view.ViewParent
createContextMenu, getParent, isLayoutRequested
 

Constructor Detail

Gallery

public Gallery(Context context)

Gallery

public Gallery(Context context,
               AttributeSet attrs)

Gallery

public Gallery(Context context,
               AttributeSet attrs,
               int defStyle)
Method Detail

setCallbackDuringFling

public void setCallbackDuringFling(boolean shouldCallback)

setAnimationDuration

public void setAnimationDuration(int animationDurationMillis)

setSpacing

public void setSpacing(int spacing)

setUnselectedAlpha

public void setUnselectedAlpha(float unselectedAlpha)

getChildStaticTransformation

protected boolean getChildStaticTransformation(View child,
                                               Transformation t)
Overrides:
getChildStaticTransformation in class ViewGroup

computeHorizontalScrollExtent

protected int computeHorizontalScrollExtent()
Overrides:
computeHorizontalScrollExtent in class View

computeHorizontalScrollOffset

protected int computeHorizontalScrollOffset()
Overrides:
computeHorizontalScrollOffset in class View

computeHorizontalScrollRange

protected int computeHorizontalScrollRange()
Overrides:
computeHorizontalScrollRange in class View

checkLayoutParams

protected boolean checkLayoutParams(ViewGroup.LayoutParams p)
Overrides:
checkLayoutParams in class ViewGroup

generateLayoutParams

protected ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p)
Overrides:
generateLayoutParams in class ViewGroup

generateLayoutParams

public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs)
Overrides:
generateLayoutParams in class ViewGroup

generateDefaultLayoutParams

protected ViewGroup.LayoutParams generateDefaultLayoutParams()
Overrides:
generateDefaultLayoutParams in class AbsSpinner

onLayout

protected void onLayout(boolean changed,
                        int l,
                        int t,
                        int r,
                        int b)
Overrides:
onLayout in class AdapterView<SpinnerAdapter>

onTouchEvent

public boolean onTouchEvent(MotionEvent event)
Overrides:
onTouchEvent in class View

onSingleTapUp

public boolean onSingleTapUp(MotionEvent e)
Specified by:
onSingleTapUp in interface GestureDetector.OnGestureListener

onFling

public boolean onFling(MotionEvent e1,
                       MotionEvent e2,
                       float velocityX,
                       float velocityY)
Specified by:
onFling in interface GestureDetector.OnGestureListener

onScroll

public boolean onScroll(MotionEvent e1,
                        MotionEvent e2,
                        float distanceX,
                        float distanceY)
Specified by:
onScroll in interface GestureDetector.OnGestureListener

onDown

public boolean onDown(MotionEvent e)
Specified by:
onDown in interface GestureDetector.OnGestureListener

onLongPress

public void onLongPress(MotionEvent e)
Specified by:
onLongPress in interface GestureDetector.OnGestureListener

onShowPress

public void onShowPress(MotionEvent e)
Specified by:
onShowPress in interface GestureDetector.OnGestureListener

dispatchSetSelected

public void dispatchSetSelected(boolean selected)
Overrides:
dispatchSetSelected in class ViewGroup

dispatchSetPressed

protected void dispatchSetPressed(boolean pressed)
Overrides:
dispatchSetPressed in class ViewGroup

getContextMenuInfo

protected ContextMenu.ContextMenuInfo getContextMenuInfo()
Overrides:
getContextMenuInfo in class View

showContextMenuForChild

public boolean showContextMenuForChild(View originalView)
Specified by:
showContextMenuForChild in interface ViewParent
Overrides:
showContextMenuForChild in class ViewGroup

showContextMenu

public boolean showContextMenu()
Overrides:
showContextMenu in class View

dispatchKeyEvent

public boolean dispatchKeyEvent(KeyEvent event)
Overrides:
dispatchKeyEvent in class ViewGroup

onKeyDown

public boolean onKeyDown(int keyCode,
                         KeyEvent event)
Specified by:
onKeyDown in interface KeyEvent.Callback
Overrides:
onKeyDown in class View

onKeyUp

public boolean onKeyUp(int keyCode,
                       KeyEvent event)
Specified by:
onKeyUp in interface KeyEvent.Callback
Overrides:
onKeyUp in class View

setGravity

public void setGravity(int gravity)

getChildDrawingOrder

protected int getChildDrawingOrder(int childCount,
                                   int i)
Overrides:
getChildDrawingOrder in class ViewGroup

onFocusChanged

protected void onFocusChanged(boolean gainFocus,
                              int direction,
                              Rect previouslyFocusedRect)
Overrides:
onFocusChanged in class View


Copyright © 2008-2012. All Rights Reserved.