I need to read user input (numberdecimal) and convert that input to double format. My app keep crashing. I am trying to display user input in textView : <p>Trying to read input and then display it in textview and utilize that user input. I am not sure how to read user input and use that input it could be string or number or numberdecimal type. 
  *</p>

<pre><code>&lt;EditView
        android:id="@+id/editText1"
        android:layout_width="368sp"
        android:layout_height="35sp"
        android:layout_marginTop="73dp"
        android:background="#9E9E9E"
        android:hint="Enter Initial Bill Total"
        android:gravity="center_vertical|center_horizontal"
        android:ems="10"
        android:inputType="numberDecimal"
        android:textSize="32dp"
        android:layout_marginLeft="8dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent" /&gt;
    &lt;TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="TextView"
        android:layout_marginTop="110dp"
        app:layout_constraintTop_toBottomOf="@+id/editText1"
        android:layout_marginLeft="163dp"
        app:layout_constraintLeft_toLeftOf="parent" /&gt;
</code></pre>

<p>*
*</p>

<pre><code>public class MainActivity extends AppCompatActivity {
    double d;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
    public void display(int score) {
        EditText mEdit   = (EditText)findViewById(R.id.editText1);
        String value = mEdit.getText().toString();
        d = Double.parseDouble(value);
    }
    private void displaytext(double number) {
        TextView quantityTextView = (TextView) findViewById(R.id.textView);
        quantityTextView.setText("" + number);
    }
}
</code></pre>

<p>*</p>
