SeekBarpublic class SeekBar extends AbsSeekBar A SeekBar is an extension of ProgressBar that adds a draggable thumb. The user can touch
the thumb and drag left or right to set the current progress level or use the arrow keys.
Placing focusable widgets to the left or right of a SeekBar is discouraged.
Clients of the SeekBar can attach a {@link SeekBar.OnSeekBarChangeListener} to
be notified of the user's actions. |
Fields Summary |
---|
private OnSeekBarChangeListener | mOnSeekBarChangeListener |
Constructors Summary |
---|
public SeekBar(android.content.Context context)
this(context, null);
| public SeekBar(android.content.Context context, android.util.AttributeSet attrs)
this(context, attrs, com.android.internal.R.attr.seekBarStyle);
| public SeekBar(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)
this(context, attrs, defStyleAttr, 0);
| public SeekBar(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes)
super(context, attrs, defStyleAttr, defStyleRes);
|
Methods Summary |
---|
public void | onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent event)
super.onInitializeAccessibilityEvent(event);
event.setClassName(SeekBar.class.getName());
| public void | onInitializeAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo info)
super.onInitializeAccessibilityNodeInfo(info);
info.setClassName(SeekBar.class.getName());
| void | onProgressRefresh(float scale, boolean fromUser)
super.onProgressRefresh(scale, fromUser);
if (mOnSeekBarChangeListener != null) {
mOnSeekBarChangeListener.onProgressChanged(this, getProgress(), fromUser);
}
| void | onStartTrackingTouch()
super.onStartTrackingTouch();
if (mOnSeekBarChangeListener != null) {
mOnSeekBarChangeListener.onStartTrackingTouch(this);
}
| void | onStopTrackingTouch()
super.onStopTrackingTouch();
if (mOnSeekBarChangeListener != null) {
mOnSeekBarChangeListener.onStopTrackingTouch(this);
}
| public void | setOnSeekBarChangeListener(android.widget.SeekBar$OnSeekBarChangeListener l)Sets a listener to receive notifications of changes to the SeekBar's progress level. Also
provides notifications of when the user starts and stops a touch gesture within the SeekBar.
mOnSeekBarChangeListener = l;
|
|