How to set the Android progressbar's height?

Tom Xue picture Tom Xue · Nov 22, 2012 · Viewed 110.2k times · Source

My activity_main.xml is below, as you see, the height is set 40 dip.

And in MyEclipse, it looks like below:

enter image description here

But when I run it on my phone, it looks like below:

enter image description here

So my question is why the real height of the progressbar is not the one I set? How to increase the height of the progressbar?

Answer

Martin Pfeffer picture Martin Pfeffer · Dec 4, 2014

I guess the simplest solution would be:

mProgressBar.setScaleY(3f);