Android SeekBar Minimum and Continuous Float Value Attributes

Posted by fordays on Stack Overflow See other posts from Stack Overflow or by fordays
Published on 2010-06-09T21:18:01Z Indexed on 2010/06/09 21:22 UTC
Read the original article Hit count: 727

Filed under:

I'm looking for a way to implement a minimum value in my SeekBar and also have the option to increment decimal numbers. For example, currently my SeekBar's minimum is set to 0, but I need it to start at the value 0.2. Also, I would like to have the functionality to be able to have the user select a number from 0.2 to 10.0 at a .1 precision so they can choose the numbers 5.6 or 7.1.

Here are the style attributes for my SeekBar:

 <style name="SeekBar">
            <item name="android:paddingLeft">30dp</item>
            <item name="android:paddingRight">30dp</item>
            <item name="android:layout_width">fill_parent</item>
            <item name="android:layout_height">wrap_content</item>
            <item name="android:layout_marginTop">0dp</item>
            <item name="android:layout_marginBottom">0dp</item>
            <item name="android:max">10</item>
            <item name="android:progress">1</item>

    </style>

© Stack Overflow or respective owner

Related posts about android