How to set style to a progressBar programmatically on Android

后端 未结 1 752
抹茶落季
抹茶落季 2021-02-13 11:09

I have ProgressBar style in style.xml. When I create layout, put there ProgressBar and set style like:

style=\"@style/ProgressBarStyle\"

set la

相关标签:
1条回答
  • 2021-02-13 11:15

    You can set your style from the constructor, for instance:

    progressBar = new ProgressBar(activity, null, android.R.attr.progressBarStyleSmall);
    

    Where the third attribute is the style.

    In your case, I think the error is to choose a wrong one. Just this.

    0 讨论(0)
提交回复
热议问题