public class Talk
extends Fragment
Data collected here includes which person was selected, the timing to select it, and the 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) int |
choice_time
Value indicating at what time the person the user can talk to was
selected.
|
(package private) FrameLayout[] |
highlights
Highlights to signal to the user that a selection of one of the six
people you can talk to has been selected.
|
(package private) boolean |
personSelected
Value indicating that the user has selected one person.
|
(package private) SSJsonReader |
reader
The instance of the
SSJsonReader class that reads in the dynamic
content for the application. |
(package private) int |
selected
Value indicating what person the user can talk to was selected.
|
(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 |
---|
Talk(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)
Method called by the Android system when a person has been selected.
|
void |
onCompletion(MediaPlayer arg0)
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 Talk
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.int choice_time
FrameLayout[] highlights
boolean personSelected
SSJsonReader reader
SSJsonReader
class that reads in the dynamic
content for the application.int selected
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 Talk(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 onClick(View v)
public void onCompletion(MediaPlayer arg0)
voComplete
to indicate the
voice over file has finished playing. If at one person has been selected,
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.