[android-developers] How to pass parameters to the AlarmService?
Hello, Please see the following code. It could not pass those extra parameters to the intent. When I tried show the keys in the intent, it only gets the key android.intent.extra.ALARM_COUNT. Anything I did wrong? Please teach me how can I pass some parameters to the AlarmService when the alarm activate? Best regards, Eric AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE); Intent myIntent = new Intent(this, TVAlarmService.class); PendingIntent pendingIntent = PendingIntent.getService(Main.MAIN, 0, myIntent, PendingIntent.FLAG_UPDATE_CURRENT); myIntent.putExtra(name, lValue); myIntent.putExtra(program, program); myIntent.putExtra(today, today); alarmManager.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), pendingIntent); === public class MyAlarmService extends Service { @Override public void onStart(Intent intent, int startId) { Bundle extras = intent.getExtras(); for(String k : extras.keySet()) { Log.i(TAG, key + k); } } -- 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
[android-developers] Re: How to change the background color of ToggleButton?
Yes, I just want to change the button background. How can I do it at runtime? Would you please to give me a simple example? Best regards, Eric On Jan 29, 2:17 am, Kostya Vasilyev kmans...@gmail.com wrote: If you only want tochangethe way aToggleButtonlooks (not behaves), you can replace the background from XML with your own. Note thatToggleButtonuses a layer-list drawable to overlay the toggle state over the standard button background, to reduce the number of needed images. You can find the resource in data directory inside the platforms\platform-API version\data\res folder on your computer. -- Kostya 28.01.2011 21:08, Roger Podacter пишет: I was interested in doing something like this as well. My app has 6 toggle buttons in a row on one line, and it doesn't quite fit on portrait screen. I wanted to make a custom toggle button, color, width, etc. You could also make your own state-list drawable I think It's called. Anyway in the source of the s d k I think you can find the toggle button and then edit it, not sure though. On Jan 27, 7:08 pm, TreKingtreking...@gmail.com wrote: On Tue, Jan 25, 2011 at 10:43 PM, Eric Choweric...@gmail.com wrote: How can Ichangethe background color of aToggleButton? Go to the documentation, find the entry forToggleButton, then start reading. There-in lies the answer. --- -- TreKinghttp://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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
[android-developers] How to change the background color of ToggleButton?
Hello, How can I change the background color of a ToggleButton? -- 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