Remove vertical padding from horizontal ProgressBar

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

    I'm using style="@style/Widget.AppCompat.ProgressBar.Horizontal" and it was fairly easy to get rid of the margins. That style is:

        @drawable/progress_horizontal_material
        @drawable/progress_indeterminate_horizontal_material
        16dip
        16dip
    

    I just overrode the min/max height:

        
    

提交回复
热议问题