|
Build 1.0_r1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectandroid.view.View
android.widget.ProgressBar
android.widget.AbsSeekBar
public abstract class AbsSeekBar
| 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 |
|---|
| 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. |
protected void |
onSizeChanged(int w,
int h,
int oldw,
int oldh)
This is called during layout when the size of this view has changed. |
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 java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbsSeekBar(Context context)
public AbsSeekBar(Context context,
AttributeSet attrs)
public AbsSeekBar(Context context,
AttributeSet attrs,
int defStyle)
| Method Detail |
|---|
public void setThumb(Drawable thumb)
thumb - Drawable representing the thumbpublic int getThumbOffset()
setThumbOffset(int)public void setThumbOffset(int thumbOffset)
thumbOffset - The offset amount in pixels.protected boolean verifyDrawable(Drawable who)
Be sure to call through to the super class when overriding this function.
verifyDrawable in class ProgressBarwho - The Drawable to verify. Return true if it is one you are
displaying, else return the result of calling through to the
super class.
unscheduleDrawable(Drawable),
drawableStateChanged()protected void drawableStateChanged()
Be sure to call through to the superclass when overriding this function.
drawableStateChanged in class ViewsetState(int[])
protected void onSizeChanged(int w,
int h,
int oldw,
int oldh)
onSizeChanged in class ProgressBarw - Current width of this view.h - Current height of this view.oldw - Old width of this view.oldh - Old height of this view.protected void onDraw(Canvas canvas)
onDraw in class ProgressBarcanvas - the canvas on which the background will be drawn
protected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
Measure the view and its content to determine the measured width and the measured height. This method is invoked by 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 setMeasuredDimension(int, int) to store the
measured width and height of this view. Failure to do so will trigger an
IllegalStateException, thrown by
measure(int, int). Calling the superclass'
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 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 (getSuggestedMinimumHeight() and getSuggestedMinimumWidth()).
onMeasure in class ProgressBarwidthMeasureSpec - 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.getMeasuredWidth(),
getMeasuredHeight(),
setMeasuredDimension(int, int),
getSuggestedMinimumHeight(),
getSuggestedMinimumWidth(),
getMode(int),
getSize(int)public boolean onTouchEvent(MotionEvent event)
onTouchEvent in class Viewevent - The motion event.
|
Build 1.0_r1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||