disable automatic screen brightness programmatically

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

disable automatic screen brightness programmatically

Postby claudette » Mon Jan 04, 2010 12:08 pm

hello everybody! happy new year!

I've got a question concerning the programmatically screen settings.
I am setting the backlight with following code:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. WindowManager.LayoutParams  lp = getWindow().getAttributes();
  3.  
  4. lp.screenBrightness = brightness;
  5.  
  6. getWindow().setAttributes(lp);
  7.  
  8.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


It works fine when the automatic screen brightness is off.
I coudn't figure out how to disable the automatic screen brightness programmatically, so as to override the user settings. does anybody know?

regards,
claudette
claudette
Freshman
Freshman
 
Posts: 7
Joined: Thu Nov 19, 2009 11:58 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 5 guests