Cleanup the preference code for editing an alarm.
Add a save and cancel bar at the bottom similar to the contacts application. Rather than updating the alarm in the database for every change in the settings, the user must hit 'save' to save the changes. Update AlarmPreference and RepeatPreference to manage their own summary instead of having callbacks. When saving the alarm, retrieve all the values from the preference widgets. Make each preference non-persistent to avoid saving them to the shared preferences. In order to get the save/cancel buttons flush on the bottom, I have to undo what the PreferenceActivity does in onCreate. I then build my own LinearLayout to hold the ListView and the two buttons.
Loading
Please register or sign in to comment