2013年11月12日 星期二

Android double no scientific notation

不想印出科學符號

ex: 1.33E10  ->  13300000000

Double temp=Double.parseDouble(textview.getText().toString());
s=new BigDecimal(temp).toPlainString();
textview.setText(s);


另一個解法是使用 DecimalFormat


沒有留言:

張貼留言