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:

  1. increased size of edit text didn't solve problem.
  2. 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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -