title: Finish (Close) a Android Activity on Touch
body: <p>How to terminate an Activity in Adroid on touch. Here i shows a view which is described in details.xml. I need to dismiss the activity on touch. I tried the following code. But its not working. Any ideas?</p>
  
  <pre><code>public class Details extends Activity {
      protected void onCreate(Bundle savedInstanceState){
          super.onCreate(savedInstanceState);
          setContentView(R.layout.details);
      }
      public boolean onTouchEvent(MotionEvent event){
          this.finish();
          return true;
      }       
  }
  </code></pre>