I'm new in Android and I want to get an integer value to String variable to set that value to TextView
Asked
Active
Viewed 130 times
-4
-
DuplicateSee post : Problems converting Integer to String for your answer http://stackoverflow.com/q/4105655/594773 – Pascal Piché Mar 10 '12 at 19:25
3 Answers
0
int i = 12;
String str = String.valueOf(i); // one option
str = "" + i; // two options
Integer num = i;
str = num.toString();
You should always try to find the answer yourself before posting here.

Boris Strandjev
- 46,145
- 15
- 108
- 135
0
Try the following code:-
(integerValue).toString()

0xC0DED00D
- 19,522
- 20
- 117
- 184

Pratik Patel
- 474
- 4
- 20
0
I think you should use this.
String str = Integer.toString(integer_variable);

Pang
- 9,564
- 146
- 81
- 122

Never Quit
- 2,072
- 1
- 21
- 44