I have coded a program that calculates the values of 1st and 2nd text box and display the result in 3rd text box after taping the "Add" button. But I want to display the result into the 3rd text box as soon as I start typing in 1st or 2nd text box automatically, without using any buttons. I know this is possible, because many calculator apps are there, that do the expected work. My code is given bellow. Just want to remove the "ADD" button and do the calculation automatically. Please help me...

"activity\_main.xml" code
-------------------------

```
<?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.saptarshi.test.MainActivity">

    <LinearLayout
       android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1">
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="numberDecimal"
        android:ems="10"
        android:id="@+id/t1"
        android:layout_weight="1"
        android:hint="1st number" />
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="numberDecimal"
        android:ems="10"
        android:id="@+id/t2"
        android:layout_weight="1"
        android:hint="2nd number" />
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="numberDecimal"
        android:ems="10"
        android:id="@+id/t3"
        android:layout_weight="1"
        android:hint="Total" />
    <Button
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Add"
        android:id="@+id/button"
        android:layout_weight="1"
        android:onClick="add" />

</LinearLayout>

</LinearLayout>

```

"MainActivity.Java" Code
------------------------

```
public void add(View view){
        EditText a = (EditText) findViewById(R.id.t1);
        EditText b = (EditText) findViewById(R.id.t2);
        EditText c = (EditText) findViewById(R.id.t3);
        int x = Integer.parseInt(a.getText().toString());
        int y = Integer.parseInt(b.getText().toString());
        int z = x+y;
        c.setText(Integer.toString(z));
    }

```