Pregunta

I am making a throughput calculator where the user inputs data and the duration it took to download or upload and my intention is to display the throughput in varying units.

However, I cannot find a way to convert float to CharSequence so I can append it to my TextView.

Any help is appreciated.

Thanks

¿Fue útil?

Solución

This should do the trick:

string s = Float.toString(myFloat);

Otros consejos

String.valueOf(thisIsYourFloat) will work.

What about this:

myFloat+""

.-

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top