Are you trying to fade to black? Use this theme in AndroidManifest.xml:
<application android:theme="@android:style/Theme.Translucent" Then, you need to write code that modifies this property in activity_main.xml: <RelativeLayout android:background="#ee000000" That property will go from #00000000 (fully transparent) to #ff000000 (opaque black). On Tuesday, July 24, 2012 11:49:36 AM UTC-5, Cythes wrote: > > So this is really a repost from Stack Overflow so that is out there in the > open. Here is what I am trying to do, I'm trying to get the screen to > "black out" when I run the app in question. I know this > sounds Spam-like but I assure you this app is being built in the best of > intentions. So here is the basic jist of the code I need a hand with: > > WindowManager.LayoutParams lp = getWindow().getAttributes(); > float brightness = 1.0f; > lp.screenBrightness = brightness; > getWindow().setAttributes(lp); > > I have also tried: > > android.provider.Settings.System.putInt(this.getContentResolver(), > android.provider.Settings.System.SCREEN_BRIGHTNESS, ); > > As well as: > WindowManager.LayoutParams lp = getWindow().getAttributes(); > lp.BRIGHTNESS_OVERRIDE_OFF; > > So Whats going on here? > > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en