And here are code snips of how I use.

To set up:


        aa = new AlarmListAdapter(this, R.layout.alarmlist_item,
alarms);
        alarmsListView.setAdapter(aa);

To update:


                switch( requestCode ) {
                        case( NEW_ALARM ): {

                                Alarm newAlarm = new Alarm(expiryString, title, 
message);
                                alarms.add(newAlarm);
                                aa.notifyDataSetChanged();

                                break;

                        }
                        case( EDIT_ALARM ): {

                                // If we only get the default value of -1 then 
something is wrong
                                if( index == -1 )
                                        throw new RuntimeException();

                                alarms.get(index).setExpiry(expiryString);
                                alarms.get(index).setTitle(title);
                                alarms.get(index).setMessage(message);
                                aa.notifyDataSetChanged();

                                break;

                        }
                }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to