Remove vertical padding from horizontal ProgressBar

后端 未结 22 2049
眼角桃花
眼角桃花 2020-11-28 03:30

By default the ProgressBar has a certain padding above and below the bar itself. Is there a way to remove this padding so as to only have the bar in the end?

22条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 04:27

    To remove the vertial padding of ProgressBar, you can do by

    • fix the height of ProgressBar
    • Use scaleY="value" (value = height/4) (4 is default height of progress bar)

    Example contains 1 wrap_content ProgressBar, 1 8dp ProgressBar, 1 100dp ProgressBar

    
    

提交回复
热议问题