how to clear entries from several EditTexts?
<p>I am new to java and android so please forgive me if i am asking to simple question. 
I have an application which requires user input in two EditTexts. Those inputs are multipied and result is displayed in TextView. I would like to use "clear entries" button which would clear the content of user entries and displayed result. Is there any way to do it?</p>

<p>Here is an application code.</p>

<pre><code>package c.example.rectangle;

import android.os.Bundle;

import android.view.View;
import android.app.Activity;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;



public class MainActivity extends Activity implements OnClickListener{

    EditText l;
     EditText w;
     TextView a;
     Button b;


    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);  

        l = (EditText) findViewById(R.id.length);
        w = (EditText) findViewById(R.id.width);
        a = (TextView) findViewById(R.id.lblarea);
        b = (Button) findViewById(R.id.calculate);

        b.setOnClickListener(this);

    }

    public void onClick(View v) {
        calculateRectangle(l.getText().toString(), w.getText().toString());


    }
    private void calculateRectangle(String clength, String cwidth){


        double area = Double.parseDouble(clength)*Double.parseDouble(cwidth);

        a.setText(String.valueOf(area)); 
}}
</code></pre>

<p>And here is my XML Code.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#8B4513"
    android:orientation="vertical" &gt;

    &lt;TextView
        android:id="@+id/label1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="20dp"
        android:background="#2F4F4F"
        android:gravity="center"
        android:text="@string/rect"
        android:textAppearance="?android:attr/textAppearanceMedium" /&gt;

    &lt;LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#8B4513"
        android:orientation="horizontal" &gt;

        &lt;TextView
            android:id="@+id/label2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="30dp"
            android:layout_marginTop="50dp"
            android:background="#2F4F4F"
            android:gravity="center"
            android:text="@string/cm"
            android:textAppearance="?android:attr/textAppearanceMedium" /&gt;

        &lt;EditText
            android:id="@+id/length"
            android:layout_width="110dp"
            android:layout_height="21dp"
            android:layout_marginLeft="40dp"
            android:layout_marginTop="50dp"
            android:background="#2F4F4F"
            android:ems="10"
            android:gravity="center"
            android:hint="@string/help"
            android:inputType="text" /&gt;


    &lt;/LinearLayout&gt;

 &lt;LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#8B4513"
        android:orientation="horizontal" &gt;

    &lt;TextView
        android:id="@+id/label3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#2F4F4F"
        android:layout_marginLeft="30dp"
        android:layout_marginTop="20dp"
        android:text="@string/breadth"
        android:textAppearance="?android:attr/textAppearanceMedium" /&gt;

    &lt;EditText
        android:id="@+id/width"
        android:layout_width="110dp"
        android:layout_height="21dp"
        android:layout_marginLeft="33dp"
        android:layout_marginTop="20dp"   
        android:background="#2F4F4F"
        android:inputType="text"
        android:hint="@string/help"

        android:ems="10" 
        android:gravity="center"
        &gt;

        &lt;requestFocus /&gt;
    &lt;/EditText&gt;

&lt;/LinearLayout&gt;

 &lt;Button
     android:id="@+id/calculate"
     android:layout_width="fill_parent"
     android:layout_marginLeft="100dip"
     android:layout_marginRight="100dip"
     android:layout_height="wrap_content"
     android:text="@string/calculate"
     android:layout_marginTop="20dp" /&gt;

 &lt;LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#8B4513"
        android:orientation="horizontal" &gt;

 &lt;TextView
     android:id="@+id/label4"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_marginLeft="30dp"
     android:layout_marginTop="20dp"
     android:background="#2F4F4F"
     android:text="@string/area"
     android:textAppearance="?android:attr/textAppearanceMedium" /&gt;

 &lt;TextView
     android:id="@+id/lblarea"
     android:layout_width="110dp"
     android:layout_height="21dp"
     android:layout_marginLeft="60dp"
     android:layout_marginTop="20dp"
     android:background="#2F4F4F"
     android:gravity="center"/&gt;
 &lt;/LinearLayout&gt;

 &lt;Button
     android:id="@+id/clear"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:layout_marginLeft="100dip"
     android:layout_marginRight="100dip"
     android:layout_marginTop="20dp"
     android:text="@string/clear" /&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>I would be very appreciate for the answer. </p>
