public class RateVideo extends Fragment implements OnSSTimerListener
Video was good or bad. Once a choice has been made, some
possible consequences of this choice are displayed to the user in the
consq element. After consequences have been shown for the amount of
time expressed by NEXT_BUTTON_DELAY_MACRO the next button is
displayed to the user indicating all required aspects of this screen have
been completed.
Data collected here includes if the user said the choice was good or bad, the time to do so, and the total time spent of this screen.
| Modifier and Type | Field and Description |
|---|---|
(package private) Activity |
activity
The instance of the current Activity
|
(package private) FrameLayout |
badHighlight
This layout is used to show to the user that they have made a selection.
|
(package private) SSCallback |
callback
The instance of the
SSCallback that allows this fragment to
communicate with the parent activity. |
(package private) boolean |
clicked
When true, indicates that the user has made their "good/bad" choice.
|
(package private) TextView |
consq
The text view which holds the dynamic consequences for the given problem
choice.
|
(package private) int |
goodBad_time
The time it took for the user to make a selection.s
|
(package private) FrameLayout |
goodHighlight
This layout is used to show to the user that they have made a selection.
|
(package private) boolean |
goodSelected
Indicates if the good button was selected.
|
(package private) int |
NEXT_BUTTON_DELAY_MACRO
Value of the delay time between when the
consq are displayed to
the user to when the next button is made visible/ |
(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) 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 |
|---|
RateVideo(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 |
onClick(View v)
The method called when good/bad decision has been selected by the user.
|
void |
onCompletion(MediaPlayer mp)
When the voice over has completed this method is called.
|
View |
onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState)
This method is called by the system to inflate the layout for the
RateVideo screen.
|
void |
onDestroy()
All data is saved within this method and memory with the
voMediaPlayer is released. |
void |
onTimerDone(SSTimer me)
|
Activity activity
FrameLayout badHighlight
SSCallback callback
SSCallback that allows this fragment to
communicate with the parent activity.boolean clicked
consq animation is needed. Default value =
false.TextView consq
int goodBad_time
FrameLayout goodHighlight
boolean goodSelected
int NEXT_BUTTON_DELAY_MACRO
consq are displayed to
the user to when the next button is made visible/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.boolean voComplete
voMediaPlayer has finished
playing. Default value = false;MediaPlayer voMediaPlayer
public RateVideo(SSJsonReader reader, int run)
SSJsonReader into memory.reader - The instance of the SSJsonReaderrun - The integer representation of the corresponding Template the
Fragment is a part of.public void onAttach(Activity activity)
public void onClick(View v)
consq are presented, and a timer
is set to show the next button in how every many seconds are defined in
NEXT_BUTTON_DELAY_MACROpublic void onCompletion(MediaPlayer mp)
public View onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState)
public void onDestroy()
voMediaPlayer is released.public void onTimerDone(SSTimer me)
consq and the next
button has elapsed this method is called by the SSTimer class
indicating the timer has expired. If the voice over has completed the
next button is displayed to the user.onTimerDone in interface OnSSTimerListenerme - The instance of SSTimer who has expired