Exemplo n.º 1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_game);

    bindService();

    Button btn = (Button) findViewById(R.id.btnBTCtest);
    btn.setOnClickListener(this);
    btn = (Button) findViewById(R.id.btnRSteptest);
    btn.setOnClickListener(this);
    btn = (Button) findViewById(R.id.btnHRSTtest);
    btn.setOnClickListener(this);
    btn = (Button) findViewById(R.id.btnAccTest);
    btn.setOnClickListener(this);
    btn = (Button) findViewById(R.id.btnStop);
    btn.setOnClickListener(this);
    btn = (Button) findViewById(R.id.btnSetRun20);
    btn.setOnClickListener(this);
    btn = (Button) findViewById(R.id.btnSetRunContinue);
    btn.setOnClickListener(this);

    gGraph0 = (ResultGraphDashBoard) findViewById(R.id.rgdb_0);
    gGraph0.setRangeMax(800, 1024);
    gGraph1 = (MultiGraphDashBoard) findViewById(R.id.rgdb_1);

    gGraph1.addSeries(getResources().getColor(R.color.opaque_shadow));
    gGraph1.addSeries(getResources().getColor(R.color.orange));
    gGraph1.addSeries(getResources().getColor(R.color.mint));
    gGraph1.setRangeMax(512, 1024);

    gSoundpool = new SoundPool(1, AudioManager.STREAM_MUSIC, 0);
    sp1 = gSoundpool.load(this, R.raw.wood1, 1);
    sp2 = gSoundpool.load(this, R.raw.wood2, 1);
  }