Skip to content

Instantly share code, notes, and snippets.

@ssaurel
Created December 25, 2017 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssaurel/9949a6c1e318a2702b2c9eb1cde4f102 to your computer and use it in GitHub Desktop.
Save ssaurel/9949a6c1e318a2702b2c9eb1cde4f102 to your computer and use it in GitHub Desktop.
Main Activity for the Conway's Game Of Life on the SSaurel's Blog
package com.ssaurel.gameoflife;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
private GameOfLifeView gameOfLifeView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
gameOfLifeView = (GameOfLifeView) findViewById(R.id.game_of_life);
}
@Override
protected void onResume() {
super.onResume();
gameOfLifeView.start();
}
@Override
protected void onPause() {
super.onPause();
gameOfLifeView.stop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment