Android: Change ProgressBar height

19 Aug

In Android development, you might dislike the very thin progress bar that Android defaults. For instance, in the below xml file, though you can specify the width and height, but you can see that width value functions, but the height value, no matter how large you specify, it remains slim horizontal bar:




To get the height value right, it is very simple:

change style=”?android:attr/progressBarStyleHorizontal” to

That is it! Happy coding!


Posted by on August 19, 2014 in Android, Java, Programming


Tags: , , , , , , , ,

4 responses to “Android: Change ProgressBar height

  1. Akash Sharma

    June 21, 2016 at 8:49 pm

    yes its working Thank a lot..

  2. Joseph

    December 19, 2016 at 1:59 am

    Thank You, it works

  3. vishal

    February 26, 2019 at 5:54 pm

    how can I change the colour of progress bar?

  4. xinyustudio

    February 27, 2019 at 8:36 pm

    @vishal, progressBar.getProgressDrawable().setColorFilter(Color.RED,;


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

%d bloggers like this: