Created
March 29, 2016 06:12
-
-
Save krugloid/06daa3957e3cc948db00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TextView mCounterText; | |
Button mCounterIncrementButton; | |
int mClicks = 0; | |
public void onCreate(Bundle b) { | |
super.onCreate(b); | |
mCounterText = (TextView) findViewById(R.id.tv_clicks); | |
mCounterIncrementButton = (Button) findViewById(R.id.btn_increment); | |
mCounterIncrementButton.setOnClickListener(new View.OnClickListener() { | |
public void onClick(View v) { | |
mClicks++; | |
mCounterText.setText(""+mClicks); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment