[ACCEPTED]-Resource Not Found Exception-android-edittext

Accepted answer
Score: 19

Quantity is an int:

public int getQuantity()

So you should use this:

objText2.setText(String.valueOf(B[i].getQuantity()));

Otherwise 5 the OS tries to find a resource for that 4 int, which is not present.

A detailed explanation: EditText.setText() method 3 is overloaded so it has a version for a 2 String (setText(CharSequence text)) and a version for a string resource 1 id (setText(int resid)).

More Related questions