public class Menu3
extends Fragment
Template3
class which Template 3 screen should be displayed to the
user. Additionally, the Menu3 Fragment displays the navigation page to the
user that allows the users to decide what Template 3 Activity is loaded next.
When the user selects a possible Template 3 screen (Video, Facts, or Game)
the Template3
class then loads the new screen. On subsequent visits,
this screen has the ability to remove functionality to the buttons presented
to the user. This removing of functionality guides the user to different
Template 3 screens that they have not already completed within the current
session. This screen also has the capability of changing is base appearance
by loading in different layouts while keeping the base logic the same.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) boolean |
fac
boolean value indicating what Template 3 elements have already been done
by the user.
|
(package private) boolean |
maz
boolean value indicating what Template 3 elements have already been done
by the user.
|
(package private) boolean |
temp3b
boolean value indicating what template this fragment is currently apart
of.
|
(package private) boolean |
vid
boolean value indicating what Template 3 elements have already been done
by the user.
|
(package private) MediaPlayer |
voMediaPlayer
The instance of voice over MediaPlayer
|
Constructor and Description |
---|
Menu3(int session,
boolean vid,
boolean maz,
boolean fac)
Constructor for the Menu3 screen.
|
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)
This method communicates to the super class
Template3 and signals
what screen should be loaded next. |
View |
onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState)
This method is called by the system to inflate the layout for the Menu3
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.boolean fac
boolean maz
boolean temp3b
boolean vid
MediaPlayer voMediaPlayer
public Menu3(int session, boolean vid, boolean maz, boolean fac)
public void onAttach(Activity activity)
public void onClick(View v)
Template3
and signals
what screen should be loaded next.public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
public void onDestroy()
voMediaPlayer
is released.