change color brightness in android
Asked Answered
A

1

2

I want to change brightness in color

I implemented this...

Settings.System.putInt(context.getContentResolver(),android.provider.Settings.System.SCREEN_BRIGHTNESS, 200);

this will change my device's brightness in black&white mode.

enter image description hereenter image description here

like above images, I can change brightness but how can I give color? Is there any other parameter which I don't know?

Aeroscope answered 2/1, 2013 at 18:33 Comment(3)
current images taken form any other app or your mock Ui?Furthest
I think Service is used for that, which keeps color screen on device.If service is stopped then nothing. but I did not find any clue that how to implement this coloring.Aeroscope
Any Idea for that i have to do like that Give me some clue. how to change screen brightness color @BhaveshHirparaCondemn
P
5

This can be accomplished using windows of type TYPE_SYSTEM_ALERT. The idea is that even services can have a Window; so you can use a service, which makes a view and call WindowManager#addView() with a view and layout params. In your case, the view will just have a background color with an alpha value. You can experiment with different layout params to achieve the required effect.

This is also how facebook chat heads works. Check out this link to know more about the implementation details: http://www.piwai.info/chatheads-basics/ This will give you an idea on how to go about implementing this type of screen overlay.

Pirate answered 19/9, 2014 at 4:42 Comment(2)
The page on the mentioned link ( piwai.info/chatheads-basics ) does not exist.Masse
but we have waybackmachine: web.archive.org/web/20160205160752/http://www.piwai.info/…Deafmute

© 2022 - 2024 — McMap. All rights reserved.