I'm programming for android, and I'm trying to display a float value found by the getX()
function on a Toast, which only displays String values. How do I do this conversion?
I'm programming for android, and I'm trying to display a float value found by the getX()
function on a Toast, which only displays String values. How do I do this conversion?
To convert a float value to string, you can use the String.valueOf()
:
String str = String.valueOf(<valor float a ser convertido>);
You can use the class Float
of Java