public interface SSCallback
Menu3
Fragment to
signal to Template3
what screen should be loaded in next, to show the
routing buttons to the user associated with Template 3, and cancel any
routing previously instantiated within Template 3.Modifier and Type | Method and Description |
---|---|
void |
addData(java.lang.String key,
java.lang.String value)
Saves key value pairs in order to have them output at the end of the
session.
|
void |
addOutputFile()
Causes all saved items from the session to be compiled and saved in the
root:/StaySafe/Data/ directory.
|
void |
animateHand(float x,
float y,
int angle,
java.lang.Runnable runnable)
Animates the floating hand used in
Template1 to simulate a user
touch. |
void |
animateHand(int i,
int j,
int k,
java.lang.Runnable runnable,
boolean b)
Convenience method similar to
animateHand(float, float, int, Runnable) This method takes an
elements absolute position on the screen and translates those values into
percentages which can be used by
animateHand(float, float, int, Runnable) This allows the pointer
to be moved around the screen dynamically in case the object needing to
be "touched" is not allows in the same position. |
void |
animateHandNext()
Convenience method of
#animateHand(int, int, int, Runnable)
Animates the floating hand used in Template1 to press the next
button. |
void |
handVisible(boolean b)
Sets the "floating hand" visibility in
Template1 |
void |
move(int i)
Used to signal to
Template3 what Fragment should be loaded next. |
void |
moveHand(float x,
float y,
int angle)
Moves the "floating hand" to this position.
|
void |
nextVisible(boolean visible)
Makes the next button visible to the user.
|
void |
restart()
Causes all saved items from the current session to be lost and forces the
application to exit back to the
Login screen. |
void |
showError(java.lang.String error)
Shows an error to the user.
|
void |
showRouting(boolean b)
Shows the routing elements (Go to Survey and Go to Menu) buttons.
|
void |
stopRoutingTimer()
Method used by
Template3 Fragments to cancel the goto survey
button being made visible from the showRouting(boolean) call if
applicable |
void addData(java.lang.String key, java.lang.String value)
key
- The title of the value being passedvalue
- The value associated with the keyvoid addOutputFile()
void animateHand(float x, float y, int angle, java.lang.Runnable runnable)
Template1
to simulate a user
touch. This method call allows a Runnable
to be passed. This
allows the hand animation to act as it actually touched the object at the
coordinates givenx
- The x location the hand should be moved to at as a percentage
of total screen size. No limits are set on the percentage.y
- The y location the hand should be moved to as a percentage of
total screen size. No limits are set on the percentage.angle
- The angle the hand show be rotated to during animation.runnable
- The runnable that corresponds to the hand "pressing" something
on the screen.void animateHand(int i, int j, int k, java.lang.Runnable runnable, boolean b)
animateHand(float, float, int, Runnable)
This method takes an
elements absolute position on the screen and translates those values into
percentages which can be used by
animateHand(float, float, int, Runnable)
This allows the pointer
to be moved around the screen dynamically in case the object needing to
be "touched" is not allows in the same position.i
- The absolute x position the hand should be moved toj
- The absolute y position the hand should be moved tok
- The angle the hand should be rotated torunnable
- The runnable that corresponds to the hand "pressing" something
on the screen.b
- fifth variable used to distinguish
animateHand(float, float, int, Runnable)
from this
one. This variable has no affect on the method.void animateHandNext()
#animateHand(int, int, int, Runnable)
Animates the floating hand used in Template1
to press the next
button.void handVisible(boolean b)
Template1
b
- visible if true invisible if falsevoid move(int i)
Template3
what Fragment should be loaded next.i
- 1 - Video\n 2 - Game\n 3 - Factsvoid moveHand(float x, float y, int angle)
Template1
.x
- The x location the hand should be moved to at as a percentage
of total screen size. No limits are set on the percentage.y
- The y location the hand should be moved to as a percentage of
total screen size. No limits are set on the percentage.angle
- The angle the hand show be rotated to during animation.void nextVisible(boolean visible)
visible
- If true, the next button will be made visible. If false, the
next button will be made invisible.void restart()
Login
screen.void showError(java.lang.String error)
ErrorFragment
error
- The error message to be displayed.void showRouting(boolean b)
Template3
screens, this method should make only the "next" button visible as
opposed to the survey and menus buttonsb
- visible if true invisible if falsevoid stopRoutingTimer()
Template3
Fragments to cancel the goto survey
button being made visible from the showRouting(boolean)
call if
applicable