Seek Bar Increase Height

To create custom seekbar, add in your xml file below code:

  <androidx.appcompat.widget.AppCompatSeekBar
                android:id="@+id/seek_homelayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="@dimen/_10sdp"
                android:maxHeight="8dip"
                android:minHeight="8dip"
                android:progressBackgroundTint="@color/thumb"
                android:progressDrawable="@drawable/sb_progress_drawable"
                android:progressTint="@color/black"
                android:secondaryProgressTint="@color/colorPrimary"
                android:thumb="@drawable/sb_thumb"
                android:thumbTint="@color/colorPrimary" />

Create sb_progress_drawable.xml file in drawable:

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

    <item android:id="@android:id/background">
        <shape android:shape="rectangle">
            <solid android:color="#26FFFFFF"/>
        </shape>
    </item>

    <item android:id="@android:id/secondaryProgress">
        <scale
            android:scaleWidth="100%" >
            <shape android:shape="rectangle">
                <solid android:color="#26FFFFFF"/>
            </shape>
        </scale>
    </item>

    <item android:id="@android:id/progress">
        <scale
            android:scaleWidth="100%" >
            <shape android:shape="rectangle">
                <solid android:color="#FFFFFF"/>
            </shape>
        </scale>
    </item>

</layer-list>

If you want to use thumb on to seekbar then add sb_thumb.xml file in your drawable:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
    <size android:width="12dp"
        android:height="12dp" />
    <solid android:color="@color/colorPrimary" />
</shape>

You have maxHeigh and minHeight attributes. This attributes will determinate the height of your seekbar.

android:maxHeight="3dp" 
android:minHeight="3dp"

https://www.lvguowei.me/post/customize-android-seekbar-color/

Cheers.


You can do this via XML.

It will work fine in your application.do 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>
</style>

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

Then in your ProgressBar add:

 android:style="@style/tallerBarStyle"

It will work perfectly.