public class Facts
extends Fragment
Data collected here includes the time to press the play button for the video and 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) uk.co.deanwild.flowtextview.FlowTextView |
leftView
The FlowTextViews
|
(package private) MediaController |
mediaControls
The instance of the MediaController
|
(package private) VideoView |
myVideoView
The instance of the VideoView
|
(package private) ImageView |
playButton
The ImageViews corresponding to the image on the left side of the screen
and the play button.
|
(package private) SSJsonReader |
reader
The instance of the
SSJsonReader class that reads in the dynamic
content for the application. |
(package private) uk.co.deanwild.flowtextview.FlowTextView |
rightView
The FlowTextViews
|
(package private) int |
sess
A int corresponding to the current session number.
|
(package private) ImageView |
sideImage
The ImageViews corresponding to the image on the left side of the screen
and the play button.
|
(package private) SSTimer |
timer
The instance of the
SSTimer used for retrieving timing values for
this Fragment. |
(package private) boolean |
videoComplete
A boolean value indicating when the
myVideoView has finished
playing. |
(package private) java.lang.String |
vidtime
A String holding the value of the time until the user pressed the play
button.
|
(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
|
Constructor and Description |
---|
Facts(SSJsonReader reader,
int session)
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 |
onClick(View v)
The method called when the user has pressed the play button.
|
void |
onCompletion(MediaPlayer mp) |
View |
onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState)
This method is called by the system to inflate the layout for the Facts
screen.
|
void |
onDestroy()
All data is saved within this method and memory with the
voMediaPlayer is released. |
void |
onPause() |
void |
onResume() |
Activity activity
SSCallback callback
SSCallback
that allows this fragment to
communicate with the parent activity.uk.co.deanwild.flowtextview.FlowTextView leftView
MediaController mediaControls
VideoView myVideoView
ImageView playButton
SSJsonReader reader
SSJsonReader
class that reads in the dynamic
content for the application.uk.co.deanwild.flowtextview.FlowTextView rightView
int sess
ImageView sideImage
SSTimer timer
SSTimer
used for retrieving timing values for
this Fragment.boolean videoComplete
myVideoView
has finished
playing. Default value = false;java.lang.String vidtime
View view
boolean voComplete
voMediaPlayer
has finished
playing. Default value = false;MediaPlayer voMediaPlayer
public Facts(SSJsonReader reader, int session)
SSJsonReader
into memory.reader
- The instance of the SSJsonReader
session
- The integer representation of the corresponding Template the
Fragment is a part of.public void onAttach(Activity activity)
public void onClick(View v)
public void onCompletion(MediaPlayer mp)
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
public void onDestroy()
voMediaPlayer
is released.public void onPause()
public void onResume()