title: onTouchEvent works on one page but it doesn't work on another page
body: <p>I am new to Android, i tried to use an <code>ontouchevent()</code> to detect screen touch, i worked on one of the sample page but when i copy pasted the same code in another page it doesn't seem to be working.</p>
  
  <p>I think it has something to do with the <code>View</code>.</p>
  
  <p>Can someone please help me on this.</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>public class HelpDesk extends Activity{ 
  @Override  
  public void onCreate(Bundle savedInstanceState)   
  {   
      // TODO Auto-generated method stub   
      super.onCreate(savedInstanceState);   
      setContentView(R.layout.help);  
      ImageButton home = (ImageButton)findViewById(R.id.home);
      ImageButton exit = (ImageButton)findViewById(R.id.exit);
  
      final Intent homeIntent = new    Intent(this,MobNavSys4VisuallyImpaired.class);
  
      home.setOnClickListener(new View.OnClickListener() 
      {
  
          public void onClick(View arg0) 
          {
              startActivity(homeIntent);
  
          }
      });
  
      exit.setOnClickListener(new View.OnClickListener() 
      {
  
          public void onClick(View arg0) 
          {
              startActivity(homeIntent);
  
          }
      });
  }
  
  public boolean onTouchEvent(MotionEvent event) 
  {
    System.out.print("touch");
      Toast.makeText(this, "hiiiiii", Toast.LENGTH_SHORT).show ();
      return true;
  }}
  </code></pre>
  
  <p>`</p>