com.stringsandints.inventium.khlrooster
Class ImageFlipper

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

public class ImageFlipper
extends Activity

The imageFlipper is a gallery for the images to flip through. It must always receive a lessonHourId via the intent as it retrieves its pictures via the lessonHour This Activity doesn't allow a landscape mode as their isn't a vertical gallery view available. On top of that, the view is perfectly usable in every position without changing the layout. From this screen it is also possible to take pictures and delete them

Author:
mathias

Field Summary
private  LessonHour lh
           
 
Constructor Summary
ImageFlipper()
           
 
Method Summary
protected  void onActivityResult(int requestCode, int resultCode, Intent data)
          The method called when a result is passed to this Activity.
protected  void onCreate(Bundle savedInstanceState)
           
 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.
private  void prepare(LessonHour lh)
          Load the images on the screen and in the gallery with the ImgAdaptor
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

lh

private LessonHour lh
Constructor Detail

ImageFlipper

public ImageFlipper()
Method Detail

onCreate

protected void onCreate(Bundle savedInstanceState)

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. 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.


prepare

private void prepare(LessonHour lh)
Load the images on the screen and in the gallery with the ImgAdaptor

Parameters:
lh - - lessonHour

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