I am trying the change the color of the indeterminate
progress bar using styles
. Added the following changes
in values/styles-v21
<style name="CustomHorizontalProgress" >
<item name="android:indeterminateTint">#FF00FF</item>
<item name="android:indeterminateTintMode">src_in</item>
</style>
and in values/styles
<style name="CustomHorizontalProgress" >
<item name="colorAccent">#FF00FF</item>
</style>
and set these styles in progressbar as below
<ProgressBar
android:id="@+id/progress"
style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal"
android:theme="@style/CustomHorizontalProgress"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:indeterminate="true"/>
For api>=21 everything this is working fine but colorAccent is not set as progress bar color in pre lollipop devices.
Note: I wanted to achieve this only using style.