예제 #1
0
  @Override
  public void onClick(View v) {
    switch (v.getId()) {
      case R.id.plusBtn:
        Constants.setPresentOperation(Constants.plus);
        startActivity(intent);
        break;

      case R.id.minusBtn:
        Constants.setPresentOperation(Constants.minus);
        startActivity(intent);
        break;
    }
  }
예제 #2
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.operation_picker);
    plus = (Button) findViewById(R.id.plusBtn);
    minus = (Button) findViewById(R.id.minusBtn);

    plus.setOnClickListener(this);
    minus.setOnClickListener(this);

    Constants.setCoins(0);

    intent = new Intent(OperationPicker.this, CountryPicker.class);
  }