com.stringsandints.inventium.khlrooster
Class LessonSoundProfileSettings

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

public class LessonSoundProfileSettings
extends Activity

LessonSoundProfileSettings is the Activity that gets started after the option 'Lesson sound profile' was chosen in the settings menu. This gives a list of options you can change regarding the sound profile during a lesson. Used properties: timeBeforeLessonMilliseconds (int), changeSoundModeForLesson (boolean) and userRingerMode (int).

Author:
Nele

Field Summary
static int SILENT
           
private  Spinner spinner
           
private  RelativeLayout timeBeforeLesson
           
private  TextView timeBeforeLessonSeconds
           
static int VIBRATE
           
 
Constructor Summary
LessonSoundProfileSettings()
           
 
Method Summary
 void onClickEventHandler(View view)
          Used property: wakeUpMillisecondsBefore (int).
protected  void onCreate(Bundle savedInstanceState)
          Called when the Activity is created.
protected  void onDestroy()
           
 void onItemSelected( av, View v, int position, long id)
          Used property: userRingerMode (int) After choosing which ringerMode the user wants to use.
 void onNothingSelected( arg0)
           
private  CheckBox restoreSoundModeChecked()
          Used property: changeSoundMode (boolean) This method reads the changeSoundMode property and places this in the checkbox.
private  void restoreSoundModeSetting()
          Used property: userRingerMode (int) This method reads the property userRingerMode and places the value in the spinner.
private  void restoreTimeInTextView()
          Used property: timeBeforeLessonMilliseconds (int) This method gets the time the user inserted earlier, formats it and places it in the TextView.
 void setHourInLabel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeBeforeLesson

private RelativeLayout timeBeforeLesson

timeBeforeLessonSeconds

private TextView timeBeforeLessonSeconds

spinner

private Spinner spinner

VIBRATE

public static final int VIBRATE
See Also:
Constant Field Values

SILENT

public static final int SILENT
See Also:
Constant Field Values
Constructor Detail

LessonSoundProfileSettings

public LessonSoundProfileSettings()
Method Detail

onCreate

protected void onCreate(Bundle savedInstanceState)
Called when the Activity is created.


onClickEventHandler

public void onClickEventHandler(View view)
Used property: wakeUpMillisecondsBefore (int). After clicking the 'Alarm time' option, this method is fired. It opens a TimePickerDialog and reads and sets the wakeUpMillisecondsBefore property.

Parameters:
view -

setHourInLabel

public void setHourInLabel()

restoreSoundModeSetting

private void restoreSoundModeSetting()
Used property: userRingerMode (int) This method reads the property userRingerMode and places the value in the spinner.


restoreSoundModeChecked

private CheckBox restoreSoundModeChecked()
Used property: changeSoundMode (boolean) This method reads the changeSoundMode property and places this in the checkbox.

Returns:

restoreTimeInTextView

private void restoreTimeInTextView()
Used property: timeBeforeLessonMilliseconds (int) This method gets the time the user inserted earlier, formats it and places it in the TextView.


onItemSelected

public void onItemSelected( av,
                           View v,
                           int position,
                           long id)
Used property: userRingerMode (int) After choosing which ringerMode the user wants to use.


onNothingSelected

public void onNothingSelected( arg0)

onDestroy

protected void onDestroy()