How do I set an Android ProgressBar's Size programmatically?

后端 未结 7 1740
盖世英雄少女心
盖世英雄少女心 2021-01-01 17:33

I have a custom view that extends ViewGroup. It includes a ProgressBar and a WebView. I\'m displaying the ProgressBar whi

7条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 17:59

    Single line solution, try this

    progressBar.setPadding(0,24,0,24);//left,top,right,bottom
    

提交回复
热议问题