标签:for val find cal orm string 科学 pre ext
就例如:
TextView textView1 = (TextView) findViewById(R.id.TextView1); double test = 99999999999.99; textView1.setText(String.valueOf(test));
会显示成9.999999999E10
解决办法
修改成:
double test = 99999999999.99; TextView textView2 = (TextView) findViewById(R.id.TextView2); textView2.setText(String.format(Locale.ENGLISH, "%.3f", test));
会显示99999999999.990
标签:for val find cal orm string 科学 pre ext
原文地址:https://www.cnblogs.com/momoshengxiao/p/9501461.html