Created
July 1, 2017 23:07
-
-
Save jshvarts/0efcdde01b95bcf9a2e2778f1052755f 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
public class DemoActivity extends AppCompatActivity { | |
@BindView(R.id.click_count_text) | |
protected TextView clickCountText; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_viewmodel_demo); | |
ButterKnife.bind(this); | |
} | |
@OnClick(R.id.increment_button) | |
public void incrementClickCount(View button) { | |
int currentClickCount = Integer.parseInt(clickCountText.getText().toString()); | |
clickCountText.setText(String.valueOf(++currentClickCount)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment