How to set the Android progressbar's height?

前端 未结 11 1633
被撕碎了的回忆
被撕碎了的回忆 2020-12-08 03:40

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

And in MyEclipse, it looks like below:

11条回答
  •  粉色の甜心
    2020-12-08 04:18

    Many solution here with lot of upvotes didn't work for me, even the accepted answer. I solved it by setting the scaleY, but isn't a good solution if you need too much height because the drawable comes pixelated.

    Programmatically:


    progressBar.setScaleY(2f);
    

    XML Layout:


    android:scaleY="2"
    

提交回复
热议问题