thanks for the help but I\'m still struggling. I did this:
Button in xml:
In your class create:
int score = 0;
And then;
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// score operation like score += increment_value;
t1.setText(""+score);
}
});
If you need to "save" the score ocne you quit the application, you need to use SharedPreferences to show/update the value.