Android: Dynamically Set the Text Property of a TextView to an Integer

2/21/2014 2:45:40 AM

The following will programmatically set the text value of a TextView to an int.

//set to an integer value
int score = this.GameSession.Score;
TextView txtScore = (TextView) findViewById(R.id.game_txtScore);
txtScore.setText(String.valueOf(score));