public class Time
extends Fragment
Data collected here is the total time the user spent on the screen.
Modifier and Type | Field and Description |
---|---|
(package private) Activity |
activity
The instance of the current Activity
|
(package private) SSCallback |
callback
The instance of the
SSCallback that allows this fragment to
communicate with the parent activity. |
(package private) ImageView |
people
The ImageView of the spinning people at the top of the screen.
|
(package private) SSJsonReader |
reader
The instance of the
SSJsonReader class that reads in the dynamic
content for the application. |
(package private) boolean |
temp1
boolean value indicating what template this fragment is currently apart
of.
|
(package private) SSTimer |
timer
The instance of the
SSTimer used for retrieving timing values for
this Fragment. |
(package private) View |
view
The instance of the current View
|
(package private) boolean |
voComplete
A boolean value indicating when the
voMediaPlayer has finished
playing. |
(package private) MediaPlayer |
voMediaPlayer
The instance of voice over MediaPlayer
|
(package private) java.lang.String |
voString
String value containing the path of the audio file to be played.
|
Constructor and Description |
---|
Time(SSJsonReader reader,
int run)
The constructor saves what template type this Fragment is a part of and
copies the instance of the
SSJsonReader into memory. |
Modifier and Type | Method and Description |
---|---|
void |
onAttach(Activity activity)
This class uses the onAttach method of the android life cycle to save an
instance of the activity and to implement the interface between the main
activity and this fragment activity
|
void |
onCompletion(MediaPlayer mp)
This method changes the value within
voComplete to indicate the
voice over file has finished playing. |
View |
onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState)
This method is called by the system to inflate the layout for the
Time screen.
|
void |
onDestroy()
All data is saved within this method and memory with the
voMediaPlayer is released. |
Activity activity
SSCallback callback
SSCallback
that allows this fragment to
communicate with the parent activity.ImageView people
SSJsonReader reader
SSJsonReader
class that reads in the dynamic
content for the application.boolean temp1
SSTimer timer
SSTimer
used for retrieving timing values for
this Fragment.View view
boolean voComplete
voMediaPlayer
has finished
playing. Default value = false;MediaPlayer voMediaPlayer
java.lang.String voString
public Time(SSJsonReader reader, int run)
SSJsonReader
into memory.reader
- The instance of the SSJsonReader
run
- The integer representation of the corresponding Template the
Fragment is a part of.public void onAttach(Activity activity)
public void onCompletion(MediaPlayer mp)
voComplete
to indicate the
voice over file has finished playing. Once completed, the Fragment
indicates to its parent activity that the next button can now be visible
to the user and the user has completed all required elements within the
Fragment.public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
public void onDestroy()
voMediaPlayer
is released.