SeekBar in android

Shital Awathe

Objective :

  • How to use SeekBar
  • How to use AudioManager with SeekBar
  • How to change your android device volume using AudioManager and SeekBar

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.

Here I have created android project name SeekBarDemo.I work on two main files and they are

  1. activity_main.xml

activity_main.xml used to place seekBar demo in android layout. The code for activity_main.xml file is given below.

  • activity_main.xml : showes how to use SeekBar and AudioManager to control the volume of android device. following is a code for

Here I set different stream with this activity. Here I set audio stream for music, ring, alarm and for notification. And called initControls() method, the code for initControls() is given below.
  1. First line showes…

View original post 88 more words


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s