public class

SeekBar

extends AbsSeekBar
java.lang.Object
   ↳ android.view.View
     ↳ android.widget.ProgressBar
       ↳ android.widget.AbsSeekBar
         ↳ android.widget.SeekBar

Class Overview

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 SeekBar.OnSeekBarChangeListener to be notified of the user's actions.

Summary

Nested Classes
interface SeekBar.OnSeekBarChangeListener A callback that notifies clients when the progress level has been changed. 
XML Attributes
Attribute Name Related Method Description
android:thumb Draws the thumb on a seekbar. 
[Expand]
Inherited XML Attributes
From class android.widget.ProgressBar
From class android.view.View
[Expand]
Inherited Constants
From class android.view.View
Public Constructors
SeekBar(Context context)
SeekBar(Context context, AttributeSet attrs)
SeekBar(Context context, AttributeSet attrs, int defStyle)
Public Methods
void setOnSeekBarChangeListener(SeekBar.OnSeekBarChangeListener l)
Sets a listener to receive notifications of changes to the SeekBar's progress level.
[Expand]
Inherited Methods
From class android.widget.AbsSeekBar
From class android.widget.ProgressBar
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

XML Attributes

android:thumb

Since: API Level

Draws the thumb on a seekbar.

Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".

This corresponds to the global attribute resource symbol thumb.

Related Methods

Public Constructors

public SeekBar (Context context)

Since: API Level 1

public SeekBar (Context context, AttributeSet attrs)

Since: API Level 1

public SeekBar (Context context, AttributeSet attrs, int defStyle)

Since: API Level 1

Public Methods

public void setOnSeekBarChangeListener (SeekBar.OnSeekBarChangeListener l)

Since: API Level 1

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.

Parameters
l The seek bar notification listener