public class Review extends Fragment implements OnSSTimerListener
Data collected here includes the time the user spent on the screen.
Modifier and Type | Field and Description |
---|---|
(package private) Activity |
activity
The instance of the current Activity
|
private Animator |
anim
The enumerable keeping track of the next item in the work-it process to
be animated.
|
(package private) SSCallback |
callback
The instance of the
SSCallback that allows this fragment to
communicate with the parent activity. |
(package private) int |
DURRATION_MACRO
Value of the fading animation length for the work-it review animation.
|
(package private) LinearLayout |
il
Layout corresponding to an item in the work-it review.
|
(package private) LinearLayout |
kl
Layout corresponding to an item in the work-it review.
|
(package private) LinearLayout |
ol
Layout corresponding to an item in the work-it review.
|
(package private) SSJsonReader |
reader
The instance of the
SSJsonReader class that reads in the dynamic
content for the application. |
(package private) boolean |
reviewDone
boolean value indicating if the work-it review has finished animating.
|
(package private) LinearLayout |
rl
Layout corresponding to an item in the work-it review.
|
(package private) Animation |
slide
The animation to be applied to the work-it LinearLayouts
|
(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) LinearLayout |
tl
Layout corresponding to an item in the work-it review.
|
(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) LinearLayout |
wl
Layout corresponding to an item in the work-it review.
|
Constructor and Description |
---|
Review(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 Review
screen.
|
void |
onDestroy()
All data is saved within this method and memory with the
voMediaPlayer is released. |
void |
onTimerDone(SSTimer me)
Animates the next item in the work-it process.
|
Activity activity
private Animator anim
SSCallback callback
SSCallback
that allows this fragment to
communicate with the parent activity.int DURRATION_MACRO
LinearLayout il
LinearLayout kl
LinearLayout ol
SSJsonReader reader
SSJsonReader
class that reads in the dynamic
content for the application.boolean reviewDone
LinearLayout rl
Animation slide
boolean temp1
SSTimer timer
SSTimer
used for retrieving timing values for
this Fragment. This instance also is used to animate items in the work-it
review every two seconds.LinearLayout tl
boolean voComplete
voMediaPlayer
has finished
playing. Default value = false;MediaPlayer voMediaPlayer
LinearLayout wl
public Review(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. If at the work-it review is
complete, 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.public void onTimerDone(SSTimer me)
timer
resets for another 2 seconds and waits to animate the next
item; ending with the t animation. At this point; the next button is made
available to the user if the voice over is complete.onTimerDone
in interface OnSSTimerListener
me
- The instance of SSTimer
who has expired