Build 1.0_r1(from source)

android.widget
Class AbsSeekBar

java.lang.Object
  extended by android.view.View
      extended by android.widget.ProgressBar
          extended by android.widget.AbsSeekBar
All Implemented Interfaces:
Drawable.Callback, KeyEvent.Callback
Direct Known Subclasses:
RatingBar, SeekBar

public abstract class AbsSeekBar
extends ProgressBar


Nested Class Summary
 
Nested classes/interfaces inherited from class android.view.View
View.BaseSavedState, View.MeasureSpec, View.OnClickListener, View.OnCreateContextMenuListener, View.OnFocusChangeListener, View.OnKeyListener, View.OnLongClickListener, View.OnTouchListener
 
Field Summary
(package private)  float mDisabledAlpha
           
(package private)  boolean mIsUserSeekable
          Whether this is user seekable.
(package private)  float mTouchProgressOffset
          On touch, this offset plus the scaled value from the position of the touch will form the progress value.
 
Fields inherited from class android.widget.ProgressBar
mMaxHeight, mMaxWidth, mMinHeight, mMinWidth, mSampleTile
 
Fields inherited from class android.view.View
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, FIRST_STATE_SET, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, INVISIBLE, KEEP_SCREEN_ON, LAST_STATE_SET, mBottom, mContext, mCurrentAnimation, MIDDLE_STATE_SET, mLayoutParams, mLeft, mLocation, mMeasuredHeight, mMeasuredWidth, mOnClickListener, mOnCreateContextMenuListener, mOnFocusChangeListener, mOnLongClickListener, mPaddingBottom, mPaddingLeft, mPaddingRight, mPaddingTop, mParent, mRight, mScrollX, mScrollY, mTag, mTop, NO_ID, 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_FIRST_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_LAST_STATE_SET, PRESSED_MIDDLE_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_SINGLE_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SINGLE_STATE_SET, SOUND_EFFECTS_ENABLED, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET
 
Constructor Summary
AbsSeekBar(Context context)
           
AbsSeekBar(Context context, AttributeSet attrs)
           
AbsSeekBar(Context context, AttributeSet attrs, int defStyle)
           
 
Method Summary
protected  void drawableStateChanged()
          This function is called whenever the state of the view changes in such a way that it impacts the state of drawables being shown.
 int getThumbOffset()
           
protected  void onDraw(Canvas canvas)
          Implement this to do your drawing.
protected  void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
           Measure the view and its content to determine the measured width and the measured height.
(package private)  void onProgressRefresh(float scale, boolean fromTouch)
           
protected  void onSizeChanged(int w, int h, int oldw, int oldh)
          This is called during layout when the size of this view has changed.
(package private)  void onStartTrackingTouch()
          This is called when the user has started touching this widget.
(package private)  void onStopTrackingTouch()
          This is called when the user either releases his touch or the touch is canceled.
 boolean onTouchEvent(MotionEvent event)
          Implement this method to handle touch screen motion events.
 void setThumb(Drawable thumb)
          Sets the thumb that will be drawn at the end of the progress meter within the SeekBar
 void setThumbOffset(int thumbOffset)
          Sets the thumb offset that allows the thumb to extend out of the range of the track.
protected  boolean verifyDrawable(Drawable who)
          If your view subclass is displaying its own Drawable objects, it should override this function and return true for any Drawable it is displaying.
 
Methods inherited from class android.widget.ProgressBar
getCurrentDrawable, getDrawableShape, getIndeterminateDrawable, getInterpolator, getMax, getProgress, getProgressDrawable, getSecondaryProgress, incrementProgressBy, incrementSecondaryProgressBy, invalidateDrawable, isIndeterminate, postInvalidate, setIndeterminate, setIndeterminateDrawable, setInterpolator, setInterpolator, setMax, setProgress, setProgress, setProgressDrawable, setSecondaryProgress, setVisibility, startAnimation, stopAnimation
 
Methods inherited from class android.view.View
addFocusables, addTouchables, applyDrawableToTransparentRegion, bringToFront, buildDrawingCache, cancelLongPress, clearAnimation, clearFocus, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createContextMenu, debug, debug, debugIndent, destroyDrawingCache, dispatchDraw, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetPressed, dispatchSetSelected, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, draw, finalize, findFocus, findViewById, findViewTraversal, findViewWithTag, findViewWithTagTraversal, fitSystemWindows, focusSearch, forceLayout, gatherTransparentRegion, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getBottomFadingEdgeStrength, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getKeepScreenOn, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMeasuredHeight, getMeasuredWidth, getNextFocusDownId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getResources, getRight, getRightFadingEdgeStrength, getRootView, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getTag, getTop, getTopFadingEdgeStrength, getTouchables, getTouchDelegate, getVerticalFadingEdgeLength, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowToken, getWindowVisibility, hasFocus, hasFocusable, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, isClickable, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isInTouchMode, isLayoutRequested, isLongClickable, isPressed, isRootNamespace, isSaveEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onAttachedToWindow, onCreateContextMenu, onCreateDrawableState, onDetachedFromWindow, onFinishInflate, onFocusChanged, onKeyDown, onKeyMultiple, onKeyShortcut, onKeyUp, onLayout, onRestoreInstanceState, onSaveInstanceState, onScrollChanged, onSetAlpha, onTrackballEvent, onWindowFocusChanged, onWindowVisibilityChanged, performClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, setAnimation, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFocusable, setFocusableInTouchMode, setFrame, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setId, setIsRootNamespace, setKeepScreenOn, setLayoutParams, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnFocusChangeListener, setOnKeyListener, setOnLongClickListener, setOnTouchListener, setPadding, setPressed, setSaveEnabled, setScrollBarStyle, setSelected, setSoundEffectsEnabled, setTag, setTouchDelegate, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setWillNotCacheDrawing, setWillNotDraw, showContextMenu, startAnimation, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mTouchProgressOffset

float mTouchProgressOffset
On touch, this offset plus the scaled value from the position of the touch will form the progress value. Usually 0.


mIsUserSeekable

boolean mIsUserSeekable
Whether this is user seekable.


mDisabledAlpha

float mDisabledAlpha
Constructor Detail

AbsSeekBar

public AbsSeekBar(Context context)

AbsSeekBar

public AbsSeekBar(Context context,
                  AttributeSet attrs)

AbsSeekBar

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

setThumb

public void setThumb(Drawable thumb)
Sets the thumb that will be drawn at the end of the progress meter within the SeekBar

Parameters:
thumb - Drawable representing the thumb

getThumbOffset

public int getThumbOffset()
See Also:
setThumbOffset(int)

setThumbOffset

public void setThumbOffset(int thumbOffset)
Sets the thumb offset that allows the thumb to extend out of the range of the track.

Parameters:
thumbOffset - The offset amount in pixels.

verifyDrawable

protected boolean verifyDrawable(Drawable who)
Description copied from class: View
If your view subclass is displaying its own Drawable objects, it should override this function and return true for any Drawable it is displaying. This allows animations for those drawables to be scheduled.

Be sure to call through to the super class when overriding this function.

Overrides:
verifyDrawable in class ProgressBar
Parameters:
who - The Drawable to verify. Return true if it is one you are displaying, else return the result of calling through to the super class.
Returns:
boolean If true than the Drawable is being displayed in the view; else false and it is not allowed to animate.
See Also:
View.unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable), View.drawableStateChanged()

drawableStateChanged

protected void drawableStateChanged()
Description copied from class: View
This function is called whenever the state of the view changes in such a way that it impacts the state of drawables being shown.

Be sure to call through to the superclass when overriding this function.

Overrides:
drawableStateChanged in class View
See Also:
Drawable.setState(int[])

onProgressRefresh

void onProgressRefresh(float scale,
                       boolean fromTouch)
Overrides:
onProgressRefresh in class ProgressBar

onSizeChanged

protected void onSizeChanged(int w,
                             int h,
                             int oldw,
                             int oldh)
Description copied from class: View
This is called during layout when the size of this view has changed. If you were just added to the view hierarchy, you're called with the old values of 0.

Overrides:
onSizeChanged in class ProgressBar
Parameters:
w - Current width of this view.
h - Current height of this view.
oldw - Old width of this view.
oldh - Old height of this view.

onDraw

protected void onDraw(Canvas canvas)
Description copied from class: View
Implement this to do your drawing.

Overrides:
onDraw in class ProgressBar
Parameters:
canvas - the canvas on which the background will be drawn

onMeasure

protected void onMeasure(int widthMeasureSpec,
                         int heightMeasureSpec)
Description copied from class: View

Measure the view and its content to determine the measured width and the measured height. This method is invoked by View.measure(int, int) and should be overriden by subclasses to provide accurate and efficient measurement of their contents.

CONTRACT: When overriding this method, you must call View.setMeasuredDimension(int, int) to store the measured width and height of this view. Failure to do so will trigger an IllegalStateException, thrown by View.measure(int, int). Calling the superclass' View.onMeasure(int, int) is a valid use.

The base class implementation of measure defaults to the background size, unless a larger size is allowed by the MeasureSpec. Subclasses should override View.onMeasure(int, int) to provide better measurements of their content.

If this method is overridden, it is the subclass's responsibility to make sure the measured height and width are at least the view's minimum height and width (View.getSuggestedMinimumHeight() and View.getSuggestedMinimumWidth()).

Overrides:
onMeasure in class ProgressBar
Parameters:
widthMeasureSpec - horizontal space requirements as imposed by the parent. The requirements are encoded with View.MeasureSpec.
heightMeasureSpec - vertical space requirements as imposed by the parent. The requirements are encoded with View.MeasureSpec.
See Also:
View.getMeasuredWidth(), View.getMeasuredHeight(), View.setMeasuredDimension(int, int), View.getSuggestedMinimumHeight(), View.getSuggestedMinimumWidth(), View.MeasureSpec.getMode(int), View.MeasureSpec.getSize(int)

onTouchEvent

public boolean onTouchEvent(MotionEvent event)
Description copied from class: View
Implement this method to handle touch screen motion events.

Overrides:
onTouchEvent in class View
Parameters:
event - The motion event.
Returns:
True if the event was handled, false otherwise.

onStartTrackingTouch

void onStartTrackingTouch()
This is called when the user has started touching this widget.


onStopTrackingTouch

void onStopTrackingTouch()
This is called when the user either releases his touch or the touch is canceled.


Build 1.0_r1(from source)

Please submit a feedback, bug or feature