title: Execute function at soft key enter
body: <p>I'm trying to add a way to execute a function on a soft key enter (or whatever the bottom right hand key would be, I assume its usually a enter/done key) once a edit text field has been filled in with numbers. I also have a calculate button that I would like to keep as a back up in an attempt to 'idiot proof' the app a little bit. below is a snippet of my code thus far; this part is working:</p>
  
  <ol>
  <li><code>onCalculate</code> refers to a button I have.</li>
  <li><p>I have error checking for null values and whatever else.</p>
  
  <p>EditText something</p>
  
  <p>public void onCalculate (View v){</p>
  
  <p>do stuff....
  }</p></li>
  </ol>
  
  <p>I want to add something down here to 'do stuff' in the event the user presses the done/enter/bottom right hand soft key instead of pressing the button. Below is a snippet from my layout XML:</p>
  
  <pre><code>&lt;EditText
  android:id="@+id/editText1"
  android:layout_width="100dp"
  android:layout_height="wrap_content"
  android:layout_alignParentLeft="true"
  android:layout_below="@+id/textView1"
  android:layout_marginTop="20dp"
  android:ems="10"
  android:inputType="numberDecimal"
  android:textSize="15sp" /&gt;
  
  &lt;Button
  android:id="@+id/button1"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_below="@+id/editText1"
  android:layout_margin/&gt;
  </code></pre>
  
  <p>I know I probably need to create some kind of key listener for the enter key, but I'm not sure how to go about it.</p>