开发者

Resources Not Found Exception

开发者 https://www.devze.com 2023-03-03 23:48 出处:网络
I have a variable int nextvalue. This is set via nextvalue = b.getInt(b.getColumnIndex(\"nextq\"))开发者_JAVA百科;

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消