Reputation: 4812
I have the following styles.xml
in my app to laod a progressspinner:
<style name="MyProgressBarSpinner" parent="@style/Widget.AppCompat.ProgressBar">
<item name="android:indeterminateDrawable">@drawable/progressspinner</item>
<item name="android:minHeight">80dp</item>
<item name="android:minWidth">80dp</item>
</style>
Unfortunately I need to load another progressspinner for Android-versions < 23. Therefore I added values-v16
to values-v22
folders containing a styles.xml
as follows:
<resources>
<style name="MyProgressBarSpinner" parent="@style/Widget.AppCompat.ProgressBar">
<item name="android:indeterminateDrawable">@drawable/progressspinnerv19</item>
<item name="android:minHeight">80dp</item>
<item name="android:minWidth">80dp</item>
</style>
</resources>
But now when I start the app with android > 23 it also uses the progressspinnerv19
instead of the one in the main styles.xml.
What am I doing wrong here?
Upvotes: 1
Views: 541
Reputation: 830
The semantics of the values-vXX folders is that what you put there will be used in version XX and above. That's why you are seeing that content on android > 23 as well.
What you have in the original styles.xml will instead be used for previous API versions.
Upvotes: 1