Example #1
0
  @Override
  protected void onResume() {
    super.onResume();

    // Get data of the Data object
    data = Data.getInstance();
    // Reset All
    data.resetAllPlayViewData();

    // display the two players name again in the textview
    playersInGame = (TextView) findViewById(R.id.playersInGame);
    playersInGame.setText(data.getPseudo1() + " vs " + data.getPseudo2());
  }
Example #2
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_play);

    // Get data of the Data object
    data = Data.getInstance();
    String pseudo1 = data.getPseudo1();
    String pseudo2 = data.getPseudo2();

    // Display them into the TextView
    playersInGame = (TextView) findViewById(R.id.playersInGame);
    playersInGame.setText(pseudo1 + " VS " + pseudo2);

    // Reset All
    data.resetAllPlayViewData();
  }