How to set the maximum value for a seekbar in android

You can only set the maximum value in android directly.

Select the Seekbar in the XML and add this line to it

android:max="VALUE"

It should look something like this

<SeekBar android:id="@+id/SeekBar01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:max="255"/>

Here the seek bar value is not from 0 - 255.

 
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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