[android-beginners] Android 2.0 - Dim screen programmatically
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 android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Changing Widget Layout Programmatically
Let's say that I have two layouts for a widget: Layout1 and Layout2. The default for the widget is Layout1, but I allow the user to choose which layout they want the widget to be. So if the user changes to Layout2, how do I programmatically change the layout to Layout2? Thanks -- You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Removing Widget from Home Screen when Uninstalled
When my application is uninstalled, the widget stays on the HOME screen and gives an error message problem loading widget. How do I remove the widget when my application is uninstalled? Is there an attribute in the manifest that I am missing? -- You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] AlertDialog from AppWidget
Is it possible use the AlertDialog from an AppWidget? I have code that works from an Activity, but when I copy that code to work when a widget is clicked, I get an error that it has stopped unexpectedly. Is it possible? or do I need to do something different? I want to display an option box to allow the user to choose from a few options. -- You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: R cannot be resolved
If you are using Eclipse as your IDE, put the cursor on the R and hit Ctrl + Shift + O (the letter O). That will automatically add the needed import statement. Ryan On Nov 11, 10:42 am, jbrohan jbro...@gmail.com wrote: Look at the other files in src/ There may be an R theredelete it! On Nov 8, 8:00 am, benjamin goth ben.fighting.h...@googlemail.com wrote: Hi I was doing fine going through the tutorials but suddenly whatever SDK I use to build against I get that R cannot be resolved I have the R.JAVA file in my gen folder and have not used the wrong import pleaeeese someone point out where I am being stupid Many thanks Ben -- You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Android 2.0 - Starting Service/App when core app starts
Is it possible to create a service that starts when the camera software starts? I have looked into services and I am still reading on them, but I wanted to know if it is possible to start a service when a core application is started/opened, and stop the service when that core application is stopped/closed. Thanks, -- You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en