类 | |
| class | FlingRotateRunnable |
Public 成员函数 | |
| CarouselImageView (Context context) | |
| CarouselImageView (Context context, AttributeSet attrs) | |
| CarouselImageView (Context context, AttributeSet attrs, int defStyle) | |
| boolean | onTouchEvent (MotionEvent event) |
| boolean | showContextMenu () |
| boolean | onKeyDown (int keyCode, KeyEvent event) |
| boolean | onKeyUp (int keyCode, KeyEvent event) |
| ViewGroup.LayoutParams | generateLayoutParams (AttributeSet attrs) |
| void | dispatchSetSelected (boolean selected) |
| boolean | showContextMenuForChild (View originalView) |
| boolean | dispatchKeyEvent (KeyEvent event) |
| boolean | onDown (MotionEvent e) |
| boolean | onFling (MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) |
| void | onLongPress (MotionEvent e) |
| boolean | onScroll (MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) |
| boolean | onSingleTapUp (MotionEvent e) |
| void | onShowPress (MotionEvent e) |
| void | setCallbackDuringFling (boolean shouldCallback) |
| void | setCallbackOnUnselectedItemClick (boolean shouldCallback) |
| void | setAnimationDuration (int animationDurationMillis) |
| void | setGravity (int gravity) |
Public 成员函数 继承自 com.ab.view.carousel.CarouselSpinner | |
| CarouselSpinner (Context context) | |
| CarouselSpinner (Context context, AttributeSet attrs) | |
| CarouselSpinner (Context context, AttributeSet attrs, int defStyle) | |
| SpinnerAdapter | getAdapter () |
| void | setAdapter (SpinnerAdapter adapter) |
| View | getSelectedView () |
| void | setSelection (int position, boolean animate) |
| void | setSelection (int position) |
| void | requestLayout () |
| int | getCount () |
| int | pointToPositionView (int x, int y) |
| int | pointToPositionImage (int x, int y) |
| Parcelable | onSaveInstanceState () |
| void | onRestoreInstanceState (Parcelable state) |
Public 成员函数 继承自 com.ab.view.carousel.CarouselAdapter< T extends Adapter > | |
| CarouselAdapter (Context context) | |
| CarouselAdapter (Context context, AttributeSet attrs) | |
| CarouselAdapter (Context context, AttributeSet attrs, int defStyle) | |
| void | setOnItemClickListener (OnItemClickListener listener) |
| final OnItemClickListener | getOnItemClickListener () |
| boolean | performItemClick (View view, int position, long id) |
| void | setOnItemLongClickListener (OnItemLongClickListener listener) |
| final OnItemLongClickListener | getOnItemLongClickListener () |
| void | setOnItemSelectedListener (OnItemSelectedListener listener) |
| final OnItemSelectedListener | getOnItemSelectedListener () |
| abstract T | getAdapter () |
| abstract void | setAdapter (T adapter) |
| void | addView (View child) |
| void | addView (View child, int index) |
| void | addView (View child, LayoutParams params) |
| void | addView (View child, int index, LayoutParams params) |
| void | removeView (View child) |
| void | removeViewAt (int index) |
| void | removeAllViews () |
| .CapturedViewProperty int | getSelectedItemPosition () |
| .CapturedViewProperty long | getSelectedItemId () |
| abstract View | getSelectedView () |
| Object | getSelectedItem () |
| .CapturedViewProperty int | getCount () |
| int | getPositionForView (View view) |
| int | getFirstVisiblePosition () |
| int | getLastVisiblePosition () |
| abstract void | setSelection (int position) |
| void | setEmptyView (View emptyView) |
| View | getEmptyView () |
| void | setFocusable (boolean focusable) |
| void | setFocusableInTouchMode (boolean focusable) |
| Object | getItemAtPosition (int position) |
| long | getItemIdAtPosition (int position) |
| void | setOnClickListener (OnClickListener l) |
| boolean | dispatchPopulateAccessibilityEvent (AccessibilityEvent event) |
Protected 成员函数 | |
| int | computeHorizontalScrollExtent () |
| int | computeHorizontalScrollOffset () |
| int | computeHorizontalScrollRange () |
| ContextMenuInfo | getContextMenuInfo () |
| void | onFocusChanged (boolean gainFocus, int direction, Rect previouslyFocusedRect) |
| boolean | checkLayoutParams (ViewGroup.LayoutParams p) |
| ViewGroup.LayoutParams | generateLayoutParams (ViewGroup.LayoutParams p) |
| void | dispatchSetPressed (boolean pressed) |
| int | getChildDrawingOrder (int childCount, int i) |
| boolean | getChildStaticTransformation (View child, Transformation transformation) |
| void | onLayout (boolean changed, int l, int t, int r, int b) |
Protected 成员函数 继承自 com.ab.view.carousel.CarouselSpinner | |
| void | onMeasure (int widthMeasureSpec, int heightMeasureSpec) |
| ViewGroup.LayoutParams | generateDefaultLayoutParams () |
Protected 成员函数 继承自 com.ab.view.carousel.CarouselAdapter< T extends Adapter > | |
| void | onLayout (boolean changed, int left, int top, int right, int bottom) |
| void | dispatchSaveInstanceState (SparseArray< Parcelable > container) |
| void | dispatchRestoreInstanceState (SparseArray< Parcelable > container) |
| boolean | canAnimate () |
包函数 | |
| void | layout (int delta, boolean animate) |
| void | selectionChanged () |
| void | setSelectedPositionInt (int position) |
| float | getLimitedMotionScrollAmount (boolean motionToLeft, float deltaX) |
| int | getLimitedMotionScrollAmount (boolean motionToLeft, int deltaX) |
| void | onCancel () |
| void | onUp () |
| void | scrollToChild (int i) |
| void | trackMotionScroll (float deltaAngle) |
包函数 继承自 com.ab.view.carousel.CarouselSpinner | |
| void | setSelectionInt (int position, boolean animate) |
| abstract void | layout (int delta, boolean animate) |
| void | resetList () |
| int | getChildHeight (View child) |
| int | getChildWidth (View child) |
| void | recycleAllViews () |
包函数 继承自 com.ab.view.carousel.CarouselAdapter< T extends Adapter > | |
| boolean | isInFilterMode () |
| void | checkFocus () |
| void | selectionChanged () |
| void | handleDataChanged () |
| void | checkSelectionChanged () |
| int | findSyncPosition () |
| int | lookForSelectablePosition (int position, boolean lookDown) |
| void | setSelectedPositionInt (int position) |
| void | setNextSelectedPositionInt (int position) |
| void | rememberSyncState () |
Private 成员函数 | |
| void | Calculate3DPosition (CarouselItemImage child, int diameter, float angleOffset) |
| int | calculateTop (View child, boolean duringLayout) |
| boolean | dispatchLongPress (View view, int position, long id) |
| void | dispatchPress (View child) |
| void | dispatchUnpress () |
| int | getCenterOfGallery () |
| void | makeAndAddView (int position, float angleOffset) |
| void | onFinishedMovement () |
| void | scrollIntoSlots () |
| void | setUpChild (CarouselItemImage child, int index, float angleOffset) |
| void | updateSelectedItemMetadata () |
静态 Private 成员函数 | |
| static int | getCenterOfView (View view) |
Private 属性 | |
| AdapterContextMenuInfo | mContextMenuInfo |
| int | mAnimationDuration = 900 |
| Camera | mCamera = new Camera() |
| Runnable | mDisableSuppressSelectionChangedRunnable |
| int | mDownTouchPosition |
| View | mDownTouchView |
| FlingRotateRunnable | mFlingRunnable = new FlingRotateRunnable() |
| GestureDetector | mGestureDetector |
| int | mGravity |
| boolean | mIsFirstScroll |
| int | mMaxQuantity = MAX_QUANTITY |
| int | mMinQuantity = MIN_QUANTITY |
| boolean | mReceivedInvokeKeyDown |
| View | mSelectedChild |
| boolean | mShouldCallbackDuringFling = true |
| boolean | mShouldCallbackOnUnselectedItemClick = true |
| boolean | mShouldStopFling |
| boolean | mSuppressSelectionChanged |
| float | mTheta = (float)(15.0f*(Math.PI/180.0)) |
| boolean | mUseReflection |
静态 Private 属性 | |
| static final String | TAG = CarouselImageView.class.getSimpleName() |
| static final boolean | localLOGV = false |
| static final int | MIN_QUANTITY = 3 |
| static final int | MAX_QUANTITY = 12 |
| static final float | MAX_THETA = 15.0f |
| static final int | SCROLL_TO_FLING_UNCERTAINTY_TIMEOUT = 250 |
© 2012 amsoft.cn 名称:CarouselImageView.java 描述:图片适配
|
inline |
Instantiates a new carousel image view.
| context | the context |
|
inline |
Instantiates a new carousel image view.
| context | the context |
| attrs | the attrs |
|
inline |
Instantiates a new carousel image view.
| context | the context |
| attrs | the attrs |
| defStyle | the def style |
|
inlineprivate |
Calculate3 d position.
| child | the child |
| diameter | the diameter |
| angleOffset | the angle offset |
|
inlineprivate |
Figure out vertical placement based on mGravity.
| child | Child to place |
| duringLayout | the during layout |
|
inlineprotected |
描述:TODO.
| p | the p |
|
inlineprotected |
Compute the horizontal extent of the horizontal scrollbar's thumb within the horizontal range. This value is used to compute the length of the thumb within the scrollbar's track.
|
inlineprotected |
Compute the horizontal offset of the horizontal scrollbar's thumb within the horizontal range. This value is used to compute the position of the thumb within the scrollbar's track.
|
inlineprotected |
Compute the horizontal range that the horizontal scrollbar represents.
|
inline |
描述:TODO.
| event | the event |
|
inlineprivate |
Dispatch long press.
| view | the view |
| position | the position |
| id | the id |
|
inlineprivate |
Dispatch press.
| child | the child |
|
inlineprotected |
描述:TODO.
| pressed | the pressed |
|
inline |
描述:TODO.
| selected | the selected |
|
inlineprivate |
Dispatch unpress.
|
inlineprotected |
描述:TODO.
| p | the p |
|
inline |
描述:TODO.
| attrs | the attrs |
|
inlineprivate |
Gets the center of gallery.
|
inlinestaticprivate |
Gets the center of view.
| view | the view |
|
inlineprotected |
Index of the child to draw for this iteration.
| childCount | the child count |
| i | the i |
|
inlineprotected |
Transform an item depending on it's coordinates.
| child | the child |
| transformation | the transformation |
|
inlineprotected |
Extra information about the item for which the context menu should be shown.
|
inlinepackage |
Gets the limited motion scroll amount.
| motionToLeft | the motion to left |
| deltaX | the delta x |
|
inlinepackage |
Gets the limited motion scroll amount.
| motionToLeft | the motion to left |
| deltaX | the delta x |
|
inlinepackage |
Setting up images.
| delta | the delta |
| animate | the animate |
|
inlineprivate |
Make and add view.
| position | the position |
| angleOffset | the angle offset |
|
inlinepackage |
On cancel.
|
inline |
描述:TODO.
| e | the e |
|
inlineprivate |
Called when rotation is finished.
|
inline |
描述:TODO.
| e1 | the e1 |
| e2 | the e2 |
| velocityX | the velocity x |
| velocityY | the velocity y |
|
inlineprotected |
描述:TODO.
| gainFocus | the gain focus |
| direction | the direction |
| previouslyFocusedRect | the previously focused rect |
|
inline |
Handles left, right, and clicking.
| keyCode | the key code |
| event | the event |
|
inline |
描述:TODO.
| keyCode | the key code |
| event | the event |
|
inlineprotected |
Setting up images after layout changed.
| changed | the changed |
| l | the l |
| t | the t |
| r | the r |
| b | the b |
|
inline |
描述:TODO.
| e | the e |
|
inline |
描述:TODO.
| e1 | the e1 |
| e2 | the e2 |
| distanceX | the distance x |
| distanceY | the distance y |
|
inline |
描述:TODO.
| e | the e |
|
inline |
描述:TODO.
| e | the e |
|
inline |
Implemented to handle touch screen motion events.
| event | the event |
|
inlinepackage |
On up.
|
inlineprivate |
Brings an item with nearest to 0 degrees angle to this angle and sets it selected.
|
inlinepackage |
Scroll to child.
| i | the i |
|
inlinepackage |
描述:TODO.
|
inline |
Sets how long the transition animation should run when a child view changes position. Only relevant if animation is turned on.
| animationDurationMillis | The duration of the transition, in milliseconds. |
ref android.R.styleable::Gallery_animationDuration
|
inline |
Whether or not to callback on any getOnItemSelectedListener() while the items are being flinged. If false, only the final selected item will cause the callback. If true, all items between the first and the final will cause callbacks.
| shouldCallback | Whether or not to callback on the listener while the items are being flinged. |
|
inline |
Whether or not to callback when an item that is not selected is clicked. If false, the item will become selected (and re-centered). If true, the
| shouldCallback | Whether or not to callback on the listener when a item that is not selected is clicked. getOnItemClickListener() will get the callback. |
|
inline |
Sets the gravity.
| gravity | the new gravity |
|
inlinepackage |
描述:TODO.
| position | the new selected position int |
|
inlineprivate |
Helper for makeAndAddView to set the position of a view and fill out its layout paramters.
| child | The view to position |
| index | the index |
| angleOffset | the angle offset |
|
inline |
Bring up the context menu for this view.
|
inline |
描述:TODO.
| originalView | the original view |
|
inlinepackage |
Tracks a motion scroll. In reality, this is used to do just about any movement to items (touch scroll, arrow-key scroll, set an item as selected).
| deltaAngle | Change in X from the previous event. |
|
inlineprivate |
Update selected item metadata.
|
staticprivate |
If logging should be inside class.
|
private |
How long the transition animation should run when a child view changes position, measured in milliseconds.
|
staticprivate |
Default max quantity of images.
|
staticprivate |
Max theta.
|
private |
Camera to make 3D rotation.
|
private |
The info for adapter context menu.
|
private |
Sets mSuppressSelectionChanged = false. This is used to set it to false in the future. It will also trigger a selection changed.
|
private |
The position of the item that received the user's down touch.
|
private |
The view of the item that received the user's down touch.
|
private |
Executes the delta rotations from a fling or scroll movement.
|
private |
Helper for detecting touch gestures.
|
private |
Gravity for the widget.
|
staticprivate |
Default min quantity of images.
|
private |
If true, this onScroll is the first for this user's drag (remember, a drag sends many onScrolls).
|
private |
Set max qantity of images.
|
private |
Set min quantity of images.
|
private |
If true, we have received the "invoke" (center or enter buttons) key down. This is checked before we action on the "invoke" key up, and is subsequently cleared.
|
private |
The currently selected item's child.
|
private |
Whether to continuously callback on the item selected listener during a fling.
|
private |
Whether to callback when an item that is not selected is clicked.
|
private |
When fling runnable runs, it resets this to false. Any method along the path until the end of its run() can set this to true to abort any remaining fling. For example, if we've reached either the leftmost or rightmost item, we will set this to true.
|
private |
If true, do not callback to item selected listener.
|
private |
The axe angle.
|
private |
If items should be reflected.
|
staticprivate |
Duration in milliseconds from the start of a scroll during which we're unsure whether the user is scrolling or flinging.
|
staticprivate |
Tag for a class logging.
1.8.8