类 | |
| interface | AbOnWheelChangedListener |
| interface | AbOnWheelScrollListener |
Protected 成员函数 | |
| void | notifyChangingListeners (int oldValue, int newValue) |
| void | notifyScrollingListenersAboutStart () |
| void | notifyScrollingListenersAboutEnd () |
| void | onMeasure (int widthMeasureSpec, int heightMeasureSpec) |
| void | onDraw (Canvas canvas) |
包函数 | |
| void | finishScrolling () |
包属性 | |
| boolean | isCyclic = false |
Private 成员函数 | |
| void | initData (Context context) |
| void | invalidateLayouts () |
| void | initResourcesIfNecessary () |
| int | getDesiredHeight (Layout layout) |
| String | getTextItem (int index) |
| String | buildText (boolean useCurrentValue) |
| int | getMaxTextLength () |
| int | getItemHeight () |
| int | calculateLayoutWidth (int widthSize, int mode) |
| void | createLayouts (int widthItems, int widthLabel) |
| void | drawShadows (Canvas canvas) |
| void | drawValue (Canvas canvas) |
| void | drawItems (Canvas canvas) |
| void | drawCenterRect (Canvas canvas) |
| void | doScroll (int delta) |
| void | setNextMessage (int message) |
| void | clearMessages () |
| void | justify () |
| void | startScrolling () |
静态 Private 属性 | |
| static final int | SCROLLING_DURATION = 400 |
| static final int | MIN_DELTA_FOR_SCROLLING = 1 |
| static final int | ITEMS_TEXT_COLOR = 0xFF000000 |
| static int[] | SHADOWS_COLORS = new int[] { 0xFF111111, 0x00AAAAAA, 0x00AAAAAA } |
| static final int | LABEL_OFFSET = 8 |
| static final int | PADDING = 5 |
| static final int | DEF_VISIBLE_ITEMS = 5 |
© 2012 amsoft.cn 名称:AbWheelView.java 描述:轮子View
|
inline |
Constructor.
| context | the context |
| attrs | the attrs |
| defStyle | the def style |
|
inline |
Constructor.
| context | the context |
| attrs | the attrs |
|
inline |
Constructor.
| context | the context |
|
inline |
Adds wheel changing listener.
| listener | the listener |
|
inline |
Adds wheel scrolling listener.
| listener | the listener |
|
inlineprivate |
Builds text depending on current value.
| useCurrentValue | the use current value |
|
inlineprivate |
Calculates control width and creates text layouts.
| widthSize | the input layout width |
| mode | the layout mode |
|
inlineprivate |
Clears messages from queue.
|
inlineprivate |
Creates layouts.
| widthItems | width of items layout |
| widthLabel | width of label layout |
|
inlineprivate |
Scrolls the wheel.
| delta | the scrolling value |
|
inlineprivate |
Draws rect for current value.
| canvas | the canvas for drawing |
|
inlineprivate |
Draws items.
| canvas | the canvas for drawing |
|
inlineprivate |
Draws shadows on top and bottom of control.
| canvas | the canvas for drawing |
|
inlineprivate |
Draws value and label layout.
| canvas | the canvas for drawing |
|
inlinepackage |
Finishes scrolling.
|
inline |
Gets wheel adapter.
|
inline |
Gets the center select gradient colors.
|
inline |
Gets the center select stroke color.
|
inline |
Gets the center select stroke width.
|
inline |
Gets current value.
|
inlineprivate |
Calculates desired height for layout.
| layout | the source layout |
|
inlineprivate |
Returns height of wheel item.
|
inline |
Gets label.
|
inlineprivate |
Returns the max item length that can be present.
|
inlineprivate |
Returns text item by index.
| index | the item index |
|
inline |
Gets count of visible items.
|
inlineprivate |
Initializes class data.
| context | the context |
|
inlineprivate |
Initializes resources.
|
inlineprivate |
Invalidates layouts.
|
inline |
Tests if wheel is cyclic. That means before the 1st item there is shown the last one
|
inlineprivate |
Justifies wheel.
|
inlineprotected |
Notifies changing listeners.
| oldValue | the old wheel value |
| newValue | the new wheel value |
|
inlineprotected |
Notifies listeners about ending scrolling.
|
inlineprotected |
Notifies listeners about starting scrolling.
|
inlineprotected |
描述:TODO.
| canvas | the canvas |
|
inlineprotected |
描述:TODO.
| widthMeasureSpec | the width measure spec |
| heightMeasureSpec | the height measure spec |
|
inline |
描述:TODO.
| event | the event |
|
inline |
Removes wheel changing listener.
| listener | the listener |
|
inline |
Removes wheel scrolling listener.
| listener | the listener |
|
inline |
Scroll the wheel.
| itemsToScroll | the items to scroll |
| time | scrolling duration |
|
inline |
Sets wheel adapter.
| adapter | the new wheel adapter |
|
inline |
Sets the additional item height.
| additionalItemHeight | the new additional item height |
|
inline |
描述:设置中间的选中层图片.
| centerSelectDrawable | the new center select drawable |
|
inline |
Sets the center select gradient colors.
| centerSelectGradientColors | the new center select gradient colors |
|
inline |
Sets the center select stroke color.
| centerSelectStrokeColor | the new center select stroke color |
|
inline |
Sets the center select stroke width.
| centerSelectStrokeWidth | the new center select stroke width |
|
inline |
Sets the current item. Does nothing when index is wrong.
| index | the item index |
| animated | the animation flag |
|
inline |
Sets the current item w/o animation. Does nothing when index is wrong.
| index | the item index |
|
inline |
Set wheel cyclic flag.
| isCyclic | the flag to set |
|
inline |
Set the the specified scrolling interpolator.
| interpolator | the interpolator |
|
inline |
Sets label.
| newLabel | the label to set |
|
inline |
Sets the label text color.
| labelTextColor | the new label text color |
|
inline |
Sets the label text size.
| labelTextSize | the new label text size |
|
inlineprivate |
Set next message to queue. Clears queue before.
| message | the message to set |
|
inline |
Sets the value text color.
| valueTextColor | the new value text color |
|
inline |
Sets the value text size.
| textSize | the new value text size |
|
inline |
Sets count of visible items.
| count | the new count |
|
inlineprivate |
Starts scrolling.
|
private |
The adapter.
|
private |
中间覆盖条高度.
|
private |
The animation handler.
|
private |
The bottom gradient colors.
|
private |
The bottom shadow.
|
private |
中间覆盖条的背景图.
|
private |
中间覆盖条的颜色,如果没有设置centerDrawable时才生效.
|
private |
The center select stroke color.
|
private |
The center select stroke width.
|
private |
The changing listeners.
|
private |
The current item.
|
staticprivate |
Default count of visible items.
|
private |
The gesture detector.
|
private |
The gesture listener.
|
package |
The is cyclic.
|
private |
The is scrolling performed.
|
private |
The item height.
|
private |
Top and bottom items offset.
|
staticprivate |
Items text color.
|
private |
The items layout.
|
private |
The items paint.
|
private |
The items width.
|
private |
The label.
|
staticprivate |
Label offset.
|
private |
The label layout.
|
private |
The label paint.
|
private |
Current label text color.
|
private |
标签的文字大小.
|
private |
The label width.
|
private |
The last scroll y.
|
private |
The m context.
|
private |
The message justify.
|
private |
The message scroll.
|
staticprivate |
Minimum delta for scrolling.
|
staticprivate |
Left and right padding value.
|
private |
屏幕高度.
|
private |
屏幕宽度.
|
private |
The scroller.
|
staticprivate |
Scrolling duration.
|
private |
The scrolling listeners.
|
private |
The scrolling offset.
|
staticprivate |
Top and bottom shadows colors.
|
private |
The top gradient colors.
|
private |
Shadows drawables.
|
private |
The top stroke color.
|
private |
The top stroke width.
|
private |
The value layout.
|
private |
The value paint.
|
private |
Current value.
|
private |
值的文字大小.
|
private |
The visible items.
1.8.8