I have a variable int nextvalue. This is set via
nextvalue = b.getInt(b.getColumnIndex("nextq"))开发者_JAVA百科;
It is definitely being set correctly as a following query relies on this value. The problem is occurring when I am trying something like
text.setText(nextvalue);
Am I going crazy is there something simple im missing?
Use text.setText(Integer.toString(nextvalue));
Answer to the same situation here. In short it says:
To set the text of a view using an integer, you need to do:
view.setText(Integer.toString(iSomeInteger))
The problem is that setText(int) is reserved for string resource ids.
精彩评论