public class Rate
extends Fragment
Data collected here includes which options were selected for each question, the total number selected for each question, the time to select each option for each question, and the total time the user spent on the screen.
Modifier and Type | Field and Description |
---|---|
(package private) int |
a
An int representing how many questions the user has selected option A for.
|
(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 |
currentQ
An int representing which question the user is currently on.
|
(package private) boolean |
done
A boolean value indicating when all three questions have been answered.
|
(package private) LinearLayout |
optA
The LinearLayouts for each of the options.
|
(package private) LinearLayout |
optB
The LinearLayouts for each of the options.
|
(package private) TextView |
optionA
The TextViews of each of the options the user selected as well as
the problem they are working on.
|
(package private) TextView |
optionB
The TextViews of each of the options the user selected as well as
the problem they are working on.
|
(package private) TextView |
problem
The TextViews of each of the options the user selected as well as
the problem they are working on.
|
(package private) java.lang.String |
q1Time
Strings representing the time it took for each question to be answered.
|
(package private) java.lang.String |
q2Time
Strings representing the time it took for each question to be answered.
|
(package private) java.lang.String |
q3Time
Strings representing the time it took for each question to be answered.
|
(package private) SSTimer |
qtimer
The instances of the
SSTimer used for retrieving timing values for
this Fragment. |
(package private) java.lang.String |
rate1
String representing which option was selected for each question.
|
(package private) ImageView |
rate1A
The ImageViews corresponding to each of the check marks under the options.
|
(package private) ImageView |
rate1B
The ImageViews corresponding to each of the check marks under the options.
|
(package private) java.lang.String |
rate2
String representing which option was selected for each question.
|
(package private) ImageView |
rate2A
The ImageViews corresponding to each of the check marks under the options.
|
(package private) ImageView |
rate2B
The ImageViews corresponding to each of the check marks under the options.
|
(package private) java.lang.String |
rate3
String representing which option was selected for each question.
|
(package private) ImageView |
rate3A
The ImageViews corresponding to each of the check marks under the options.
|
(package private) ImageView |
rate3B
The ImageViews corresponding to each of the check marks under the options.
|
(package private) TextView |
rateQ1
The TextViews of each of the different questions on the screen.
|
(package private) TextView |
rateQ2
The TextViews of each of the different questions on the screen.
|
(package private) TextView |
rateQ3
The TextViews of each of the different questions on the screen.
|
(package private) ImageView |
rateQ4
The ImageViews corresponding to each of the check marks under the options.
|
(package private) SSJsonReader |
reader
The instance of the
SSJsonReader class that reads in the dynamic
content for the application. |
(package private) boolean |
temp1
A boolean value representing if the user is on template 1.
|
(package private) SSTimer |
timer
The instances of the
SSTimer used for retrieving timing values for
this Fragment. |
(package private) View |
view
The instance of voice over MediaPlayer
|
(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
The String containing the path to the audio file for the screen.
|
Constructor and Description |
---|
Rate(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 |
---|---|
boolean |
approveNext()
This method checks to see if the voice over has been completed and
and all questions are answered
|
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)
This method is called when an option has been selected by the user.
|
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
Rate screen.
|
void |
onDestroy()
All data is saved within this method and memory with the
voMediaPlayer is released. |
void |
onTimerDone(SSTimer me) |
void |
setInvisible()
This method sets all of the questions to invisible at the start of the screen.
|
int a
Activity activity
SSCallback callback
SSCallback
that allows this fragment to
communicate with the parent activity.int currentQ
boolean done
LinearLayout optA
LinearLayout optB
TextView optionA
TextView optionB
TextView problem
java.lang.String q1Time
java.lang.String q2Time
java.lang.String q3Time
SSTimer qtimer
SSTimer
used for retrieving timing values for
this Fragment.java.lang.String rate1
ImageView rate1A
ImageView rate1B
java.lang.String rate2
ImageView rate2A
ImageView rate2B
java.lang.String rate3
ImageView rate3A
ImageView rate3B
TextView rateQ1
TextView rateQ2
TextView rateQ3
ImageView rateQ4
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 Rate(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 boolean approveNext()
false otherwise
public void onAttach(Activity activity)
public void onClick(View v)
public void onCompletion(MediaPlayer mp)
voComplete
to indicate the
voice over file has finished playing. If all questions have been answered,
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)
public void setInvisible()