diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-01-09 17:51:23 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-01-09 17:51:23 -0800 |
commit | b798689749c64baba81f02e10cf2157c747d6b46 (patch) | |
tree | da394a395ddb1a6cf69193314846b03fe47a397e /core/java/android/widget/SeekBar.java | |
parent | f013e1afd1e68af5e3b868c26a653bbfb39538f8 (diff) | |
download | frameworks_base-b798689749c64baba81f02e10cf2157c747d6b46.zip frameworks_base-b798689749c64baba81f02e10cf2157c747d6b46.tar.gz frameworks_base-b798689749c64baba81f02e10cf2157c747d6b46.tar.bz2 |
auto import from //branches/cupcake/...@125939
Diffstat (limited to 'core/java/android/widget/SeekBar.java')
-rw-r--r-- | core/java/android/widget/SeekBar.java | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/core/java/android/widget/SeekBar.java b/core/java/android/widget/SeekBar.java index e87dc2d..dfee29b 100644 --- a/core/java/android/widget/SeekBar.java +++ b/core/java/android/widget/SeekBar.java @@ -22,33 +22,35 @@ import android.util.AttributeSet; /** - * 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. - * + * 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. + * <p> + * Clients of the SeekBar can attach a {@link SeekBar.OnSeekBarChangeListener} to * be notified of the user's actions. - * Clients of the Seekbar can attach a {@link SeekBar.OnSeekBarChangeListener} to * * @attr ref android.R.styleable#SeekBar_thumb */ public class SeekBar extends AbsSeekBar { /** - * A callback that notifies clients when the progress level has been changed. This - * includes changes that were initiated by the user through a touch gesture as well - * as changes that were initiated programmatically. + * A callback that notifies clients when the progress level has been + * changed. This includes changes that were initiated by the user through a + * touch gesture or arrow key/trackball as well as changes that were initiated + * programmatically. */ public interface OnSeekBarChangeListener { /** - * Notification that the progress level has changed. Clients can use the fromTouch parameter + * Notification that the progress level has changed. Clients can use the fromUser parameter * to distinguish user-initiated changes from those that occurred programmatically. * * @param seekBar The SeekBar whose progress has changed * @param progress The current progress level. This will be in the range 0..max where max * was set by {@link ProgressBar#setMax(int)}. (The default value for max is 100.) - * @param fromTouch True if the progress change was initiated by a user's touch gesture. + * @param fromUser True if the progress change was initiated by the user. */ - void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch); + void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser); /** * Notification that the user has started a touch gesture. Clients may want to use this @@ -80,11 +82,11 @@ public class SeekBar extends AbsSeekBar { } @Override - void onProgressRefresh(float scale, boolean fromTouch) { - super.onProgressRefresh(scale, fromTouch); + void onProgressRefresh(float scale, boolean fromUser) { + super.onProgressRefresh(scale, fromUser); if (mOnSeekBarChangeListener != null) { - mOnSeekBarChangeListener.onProgressChanged(this, getProgress(), fromTouch); + mOnSeekBarChangeListener.onProgressChanged(this, getProgress(), fromUser); } } @@ -113,4 +115,5 @@ public class SeekBar extends AbsSeekBar { mOnSeekBarChangeListener.onStopTrackingTouch(this); } } + } |