1

In my android application I use an EditText for decimal values:

    <EditText
        android:id="@+id/valueEditor"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ems="10"
        android:inputType="numberDecimal" >

I use

double value; /* ... */
valueEditor = (EditText) v.findViewById(R.id.valueEditor);
valueEditor.setText(Double.toString(value));

to fill this EditText with a value.

The problem now is with values like 1.0E-9. It is possible to change the exponent, but it is not possible to change the mantissa apart from deleting numbers. Does anyone know a solution (apart from the obvious to not use inputType numberDecimal)?

Searles
  • 1,447
  • 1
  • 11
  • 26

0 Answers0