My activity_main.xml
is below, as you see, the height is set 40 dip.
And in MyEclipse, it looks like below:
But when I run it on my phone, it looks like below:
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?
You can use LayoutParams to change width and height to whatever you want. ProgressBar progressBar = new ProgressBar(teste. this, null, android. R.
In Android, by default a progress bar will be displayed as a spinning wheel but If we want it to be displayed as a horizontal bar then we need to use style attribute as horizontal. It mainly use the “android. widget. ProgressBar” class.
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. Edit the maxHeight to your desired height what you want to achieve. It will work perfectly.
I guess the simplest solution would be:
mProgressBar.setScaleY(3f);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With