com.stringsandints.inventium.khlrooster
Class EditNotification

java.lang.Object
  extended by Activity
      extended by com.stringsandints.inventium.khlrooster.EditNotification

public class EditNotification
extends Activity

This Activity provides the possibility to edit a notification. When calling this Activity the following information should be provided with the intent: (int) NOTIFICATIONID - The id of the notification to edit An additional Action must be provided. Actions can be: ACTION_EDIT_NOTIFICATION - The notification should be edited ACTION_ADD_NOTIFICATION - The notification has just been added

Author:
mathias

Field Summary
static java.lang.String ACTION_ADD_NOTIFICATION
           
static java.lang.String ACTION_EDIT_NOTIFICATION
           
private  EditNotification dit
           
private  int lastDayOfMonth
           
private  int lastHourOfDay
           
private  int lastMinute
           
private  int lastMonth
           
static java.lang.String NOTIFICATION_ID
           
private  Reminder reminder
           
private static boolean restoring
           
 
Constructor Summary
EditNotification()
           
 
Method Summary
private  boolean checkState()
          Check if the current date is valid in terms of: - it should be after the current date/time - it should come before the start of the last lesson Note that it does not check if the selection is a valid date!
protected  void onCreate(Bundle savedInstanceState)
           
private  void prepare()
          Prepare the elements on the screen, set all the actions and listeners
private  void restoreState()
          Restore the last valid values.
private  void saveDateState()
          Save the current selection.
private  void updateTitle()
          Update the title on top of the screen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_EDIT_NOTIFICATION

public static final java.lang.String ACTION_EDIT_NOTIFICATION
See Also:
Constant Field Values

ACTION_ADD_NOTIFICATION

public static final java.lang.String ACTION_ADD_NOTIFICATION
See Also:
Constant Field Values

NOTIFICATION_ID

public static final java.lang.String NOTIFICATION_ID
See Also:
Constant Field Values

reminder

private Reminder reminder

dit

private EditNotification dit

lastMonth

private int lastMonth

lastDayOfMonth

private int lastDayOfMonth

lastHourOfDay

private int lastHourOfDay

lastMinute

private int lastMinute

restoring

private static boolean restoring
Constructor Detail

EditNotification

public EditNotification()
Method Detail

onCreate

protected void onCreate(Bundle savedInstanceState)

saveDateState

private void saveDateState()
Save the current selection. This can be used later to fall back on when an invalid change is detected.


restoreState

private void restoreState()
Restore the last valid values.


checkState

private boolean checkState()
Check if the current date is valid in terms of: - it should be after the current date/time - it should come before the start of the last lesson Note that it does not check if the selection is a valid date!

Returns:
true if the selection is valid false if the selection is invalid

updateTitle

private void updateTitle()
Update the title on top of the screen. It will display the date of the next lesson based on the currently selected values.


prepare

private void prepare()
Prepare the elements on the screen, set all the actions and listeners