android - EditText converting decimal to exponential -
i storing value in database 0.0004
, displaying same in edittext
in edittext showing 4.0e-4
tried lot of things nothing seems work me.
storing value in database fine when coming edittext display wrong.
what have tried:
- increased size of edit text didn't solve problem.
followed below process
decimalformat formatter = new decimalformat("0.####"); textvalue.settext(real_formatter.format(new_percent.getlong(new_percent.getcolumnindex(bt.column2))));
but result same no chage.
can 1 solve this..i want display in edit text 0.0004
not 4.0e-4
thanks time.
instead of giving pattern bigdecimal
send directly value constructor parameter.
example:
bigdecimal number = new bigdecimal("4.0e-4"); int ints= number.intvalue(); //bigdecimal integer double doubles= number.doublevalue(); //bigdecimal double
Comments
Post a Comment