Remove vertical padding from horizontal ProgressBar

后端 未结 22 2046
眼角桃花
眼角桃花 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:09

    This is how I used Juozas's answer:

    height of my ProgressBar is 4dp. So I created a FrameLayout with height 4dp and set the layout_gravity of ProgressBar to center. It's works like a charm.

    
    
        
    
    
    

提交回复
热议问题