setText fails to show a number as text in a TextView
The problem is with lines like this
addAmount.setText(aAmt);
where aAmt
is an int
. This looks for a resource
with the id
of whatever aAmt
is. You need to cast it to a String
first like
addAmount.setText(String.valueOf(aAmt));
There are overloaded setText()
methods. See the docs
This post goes into some more detail as to how this actually works