I've been looking through the documentation for ProgressBar
class and found these attributes:
- android:progressBarStyle
- android:progressBarStyleHorizontal
- android:progressBarStyleLarge
- android:progressBarStyleSmall
These four parameters are supposed to be a reference to some style as I take it. So the question is, what are these for? Style for the progress bar is set via android:style attribute and a reference to the global style attributes.
Documentation doesn't say anything helpful, searched the Web, found nothing.
The four attributes that you mention can be applied to a
ProgressBar
's style like so:The style constant
android:progressBarStyleHorizontal
is your typical incremental progress bar:While the other three are varying sizes of the same circular progress bar:
Update:
According to adamp's comments:
In case if someone is looking for full block of code
The confusing part is that normally, you can define a default style for a widget (e.g. a button) like this:
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:
But that is not the case, since
progressBarStyle
belongs to theActionBar
styleable.