string - how to convert EditText control's value in to float value in android -


im receiving value edittext control. , want value calculation need convert float value how can that?

i tried below getting null pointer exception:

float ip1=integer.getinteger(t1.gettext().tostring()); 

any soln?

try this:

string str = t1.gettext().tostring(); float ip1 = new float(str); system.out.println("float value = "+ip1); 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -