How can I convert the below int to display the result of the sum as text in a textview?
Am getting 'cannot invoke toString() on primitive type int' - thought that was the point of toString!?!
public void onClick(View v) {
// TODO Auto-generated method stub
txtAnswer = (TextView)findViewById(R.id.txtAnswer);
editStones = (EditText)findViewById(R.id.editStones);
int result = 10 + 10;
txtAnswer.setText(result.toString());
}
String.formatto apply formatting to the number is being displayed.