Need to convert it to string?
result.setText(valueX); // не катит; result.setText(valueX + ""); // не нравится Need to convert it to string?
result.setText(valueX); // не катит; result.setText(valueX + ""); // не нравится If the setText () function is passed an integer, it will interpret it as a resource identifier and will search for such a string in the resources. To display a number on View, you must first bring it to a string. You can do it like this:
result.setText(Integer.toString(valueX)); or so:
result.setText(String.valueOf(valueX)); or so:
result.setText(valueX + ""); Source: https://ru.stackoverflow.com/questions/636986/
All Articles
setText(Integer.toString(valueX)), so roll. ..in the Integer specify the primitive type declared for your number. - pavlofff