Usman Kurd Usman Kurd - 3 months ago 50
Android Question

Seek Bar Increse height

currently i m working with seek bar that works perfectly fine. But there is an issue i want to increase the height of the Progress bar as native height is not as much high.

So How change the height of the progress bar either dynamically or through XML. Find many thing on google but could not retrive any handy solution so how to do that thing.

Thankx in advance


You can do this via XML.

It will work fine in your this simple integration in your XML where you have mentioned the Progress Bar tag.

First, you need to define the style of your progress bar in values->styles.xml of your project. something like:

<style name="tallerBarStyle" parent="@android:style/Widget.SeekBar">
<item name="android:indeterminateOnly">false</item>
<item name="android:progressDrawable">@android:drawable/progress_horizontal</item>
<item name="android:indeterminateDrawable">@android:drawable/progress_horizontal</item>
<item name="android:minHeight">8dip</item>
<item name="android:maxHeight">20dip</item>

Edit the maxHeight to your desired height what you want to achieve.

Then in your ProgressBar add:


It will work perfectly.