com.stringsandints.inventium.khlrooster
Class LessonDetail

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

public class LessonDetail
extends Activity

LessonDetail is an activity. It's used to view the details of a certain lesson. Here it is possible to take notes during the lesson, review the notes, take pictures related to this lessen, set reminders


Field Summary
private  LessonDetail dit
           
private static int IMAGE_HEIGHT_DP
           
private static int IMAGE_PADDING_DP
           
private static int IMAGE_WIDTH_DP
           
static java.lang.String LESSONHOURID
           
private  LessonHour lh
           
static int TAKE_PICTURE
           
 
Constructor Summary
LessonDetail()
           
 
Method Summary
private  void addPictureToFrame(Bitmap tumbnail)
          Adds a bitmap to the screen.
private  void addReminder(LessonHour lh)
           
private  void editMemo(LessonHour lh)
           
private  void loadLessonHour(LessonHour lh)
          Load the information of the lesson on the screen.
protected  void onActivityResult(int requestCode, int resultCode, Intent data)
          The method called when a result is passed to this Activity.
 void onCreate(Bundle savedInstanceState)
          Called when the activity is first created.
 boolean onCreateOptionsMenu(Menu menu)
          Inflate the menu,set the default icons for the items in the menu
 boolean onOptionsItemSelected(MenuItem item)
          Perform the action that should be taken when an item in the menu is clicked.
 void onSaveInstanceState(Bundle savedInstanceState)
          Save the lessonHour for when the Activity is closed in the background but should return to the same state when it is recalled
 void onWindowFocusChanged(boolean hasFocus)
           
private  void takePhoto()
          Launch a new Activity with the intention to make a Photo, When the CameraActivity takes a picture it will call this Classes onActivityResult-method To know that the result is a picture we will declare an ID that describes the action linked to the result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAKE_PICTURE

public static final int TAKE_PICTURE
See Also:
Constant Field Values

LESSONHOURID

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

IMAGE_WIDTH_DP

private static final int IMAGE_WIDTH_DP
See Also:
Constant Field Values

IMAGE_HEIGHT_DP

private static final int IMAGE_HEIGHT_DP
See Also:
Constant Field Values

IMAGE_PADDING_DP

private static final int IMAGE_PADDING_DP
See Also:
Constant Field Values

lh

private LessonHour lh

dit

private LessonDetail dit
Constructor Detail

LessonDetail

public LessonDetail()
Method Detail

onCreate

public void onCreate(Bundle savedInstanceState)
Called when the activity is first created. Main layout is shown.


takePhoto

private void takePhoto()
Launch a new Activity with the intention to make a Photo, When the CameraActivity takes a picture it will call this Classes onActivityResult-method To know that the result is a picture we will declare an ID that describes the action linked to the result. 1 Some camera-apps don't return a result but they will saved the picture on the given location. To know what location was asked we will keep this location in the static variable


onCreateOptionsMenu

public boolean onCreateOptionsMenu(Menu menu)
Inflate the menu,set the default icons for the items in the menu


onOptionsItemSelected

public boolean onOptionsItemSelected(MenuItem item)
Perform the action that should be taken when an item in the menu is clicked.


onWindowFocusChanged

public void onWindowFocusChanged(boolean hasFocus)

loadLessonHour

private void loadLessonHour(LessonHour lh)
Load the information of the lesson on the screen. This also places the different pictures related to the lessonHour

Parameters:
lh - - the lessonHour that contains the information

addReminder

private void addReminder(LessonHour lh)

onSaveInstanceState

public void onSaveInstanceState(Bundle savedInstanceState)
Save the lessonHour for when the Activity is closed in the background but should return to the same state when it is recalled


onActivityResult

protected void onActivityResult(int requestCode,
                                int resultCode,
                                Intent data)
The method called when a result is passed to this Activity. This is used when the camera has taken a picture and it should be loaded The location of the picture is kept in the database


addPictureToFrame

private void addPictureToFrame(Bitmap tumbnail)
Adds a bitmap to the screen. The bitmaps are placed on top of each other with a different angle This creates a pile of Images on top of each other The Images are rotated between -20 and 20 degrees

Parameters:
tumbnail -

editMemo

private void editMemo(LessonHour lh)