Android - How to make an progressBar touching a bottom screen border

前端 未结 5 574
春和景丽
春和景丽 2021-01-24 23:30

I want a ProgressBar that is touching a bottom border of screen but with this piece of code, I am getting an little space between bar and screen border:



        
5条回答
  •  独厮守ぢ
    2021-01-25 00:19

    I found a work around.I am basically adding a layout_marginBottom="-4dp" to my ProgressBar and wrapped it inside a RelativeLayout and aligned it to the bottom of the parent view.This changes may break your app in the future.For a better solution design a custom progress bar with your own custom drawable which you can align correctly and occupies less canvas space compared to the progressBarStyleHorizontal.

    
    
    
    
    
    
    //changes
    
    
    
    
    

    Here's the link

提交回复
热议问题