The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.
SeekBar allows the user to choose a value along a continuous range by sliding
a “thumb” along a horizontal line. In effect — and in practice, as it turns out –
SeekBar is a user-modifiable
The value range of a
SeekBar runs from 0 to a developer-set maximum value.
ProgressBar, the default maximum is 100, but that can be changed via
android:max attribute or the
setMax() method. The minimum value is always
0, so if you want a range starting elsewhere, just add your starting value to the
actual value (obtained via
getProgress()) to slide the range as desired.
You can find out about changes in the
SeekBar value by attaching an
OnSeekBarChangeListener implementation. The primary method on that interface
onProgressChanged(), where you are notified about changes in the progress
value (second parameter) and whether that change was initiated directly by
the user interacting with the widget (third parameter). The interface also
onStopTrackingTouch(), to indicate when the
user is attempting to change the position of the thumb via the touchscreen,
though these methods are less-commonly used.
The preview of this section was whisked away by a shark-infested tornado.
The preview of this section will not appear here for a while, due to a time machine mishap.