Skip to content

Instantly share code, notes, and snippets.

@abel-masila
Created July 25, 2017 10:06
Show Gist options
  • Save abel-masila/a1a44c76b1e281142e55ad59770ce510 to your computer and use it in GitHub Desktop.
Save abel-masila/a1a44c76b1e281142e55ad59770ce510 to your computer and use it in GitHub Desktop.
int myValue = 0;
TextView txtResult=(TextView)findViewById(R.id.txtResult);
//Then button event
btnIncrement.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// score operation like score += increment_value;
txtResult.setText(""+myValue);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment