I am wanting to dim the screen of a device from a widget. Basically the same way the Power Manager widget for Android 2.0 does. I have tried this... ________________________________________
Settings.System.putInt(context.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, someIntValue); ________________________________________ I have this that works from an application window.... ________________________________________ WindowManager.LayoutParams lp = getWindow().getAttributes(); lp.screenBrightness = (float) (someIntValue/ 255.0); getWindow().setAttributes(lp); ________________________________________ But this doesn't work from the widget. Any idea on how to dim the screen from a widget? -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

