Let's say I want to have text only be visible once the screen colors are inverted in a native Android application. To do this:
- Set the text color to the background color, white for example.
- Listen for the invert colors being enabled.
- Once it's enabled, disable that text's color from being inverted but let the background be inverted.
- The background should now be black, but the text will remain white.
Now, my question is, is it possible to override the effect for a specific view? According to this you can listen for inverted color changes.
However, to implement this I'll need to disable the inversion of the color of the text. I don't think this is possible, however, if it IS possible for me to do it, I'm thinking:
- The user might need to be rooted
- This might violate any terms of the device.
I'd like to try to do this by overriding the service instead of changing the text colors once the service is turned on, just for fun.