1
votes

I've got a weird issue where the same code produces pie charts with totally different fill colors (seemingly) on different Android versions. Specifically, (<=4.3) and (>=5.0) looks different for #F6F8F8 and #E4F1FF. I was initially using MPAndroidChart v2.2.5 and then upgraded to v3.0.1. Both got the same issue.

It's not a device specific issue as I tested on simulators (4.3 and 6.0) on the same mac. Neither is it a simulator issue as I can reproduce this on real devices (4.2.2 and 5.0.1). The color difference is big.

Basically, it looks like this on v5.0+ devices.

enter image description here

On v4.3 or below devices, it looks like this.

enter image description here

1

1 Answers

0
votes

Use values-v21 folder for API level 21 or higher. If the device is running on an older version of Android, the res/values-v21/ directory will be ignored.