|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectActivity
de.palmmedia.yahtzee.Program
public class Program
The activity where players can be created and the game can be started.
Nested Class Summary | |
---|---|
private class |
Program.PlayerCheckBoxListener
Executed when the checkbox related to a player is activated. |
Field Summary | |
---|---|
private TextWatcher |
textWatcher
Executed when the text of a textbox containing a player's name is changed. |
private OnClickListener |
toggleSoundListener
Executed when sound is activated/deactivated. |
Constructor Summary | |
---|---|
Program()
|
Method Summary | |
---|---|
private void |
enableNewGameButton()
Activates/Deactivates the 'New Game' button. |
private List<Player> |
getPlayers()
Get the players. |
private void |
initName(Player player,
int playerCheckBoxId,
int playerEditTextId)
Initializes the player's view elements. |
private void |
loadPlayers()
Load the saved players. |
void |
newGame(View view)
Starts a new game. |
void |
onCreate(Bundle savedInstanceState)
|
protected void |
onResume()
|
void |
resumeGame(View view)
Resumes the current game. |
private void |
savePlayers()
Saved the current player. |
void |
showHighscores(View view)
Shows the highscores. |
private void |
showResumeButton()
Shows/Hides the 'Resume' button. |
void |
toggleSound(View view)
Executed when sound is activated/deactivated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private TextWatcher textWatcher
private OnClickListener toggleSoundListener
Constructor Detail |
---|
public Program()
Method Detail |
---|
public void onCreate(Bundle savedInstanceState)
protected void onResume()
public void toggleSound(View view)
public void newGame(View view)
view
- The view.public void resumeGame(View view)
view
- The view.public void showHighscores(View view)
view
- The view.private void loadPlayers()
private void initName(Player player, int playerCheckBoxId, int playerEditTextId)
player
- The player.playerCheckBoxId
- The id of the player's checkbox.playerEditTextId
- The id of the player's textbox.private void savePlayers()
private void enableNewGameButton()
private void showResumeButton()
private List<Player> getPlayers()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |