机器人,INT字符串? [英] android, int to string?

查看:103
本文介绍了机器人,INT字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到的资源的ID如下:

  INT测试=(context.getResourceId(raw.testc3));
 

我想获得它的ID,并把它变成一个字符串。我怎样才能做到这一点?的ToString不起作用。

解决方案

 字符串的TestString = Integer.toString(试验);
 

I get the id of resource like so:

int test = (context.getResourceId("raw.testc3")); 

I want to get it's id and put it into a string. How can I do this? .toString does not work.

解决方案

String testString = Integer.toString(test);

这篇关于机器人,INT字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆