String s ="2.8"
float a = s.parseFloat()记得不是很清楚了,你可以查查API函数