What's the meaning of android:progressBarStyle attribute in ProgressBar?

后端 未结 3 561
故里飘歌
故里飘歌 2020-12-23 16:25

I\'ve been looking through the documentation for ProgressBar class and found these attributes:

  • android:progressBarStyle
  • android:progressB
3条回答
  •  执念已碎
    2020-12-23 17:08

    The confusing part is that normally, you can define a default style for a widget (e.g. a button) like this:

    @style/Widget.AppCompat.Button.Colored
    

    All buttons will then by default have this style applied.

    One would think that the progressBarStyle attribute would do the same for ProgressBar if doing this:

    @style/Widget.AppCompat.ProgressBar
    

    But that is not the case, since progressBarStyle belongs to the ActionBar styleable.

提交回复
热议问题