title: OnTouchListener not called
body: <p>I am trying to start voice recognition on a touch but the issue is OnTouchListener is not called when user touches the screen</p>
  
  <p>I tried to put breakpoint in function but it does not come in function at all</p>
  
  <p>On my laptop the Logcat is not working so I cant use log and thus using a toast to see if the function is called.</p>
  
  <p>Code is as below. can anyone please help why this function is not called on touch??</p>
  
  <p>Updated:</p>
  
  <p>I am calling setOnTouchListener in OnCreate and now after using view my application is crashing on startup.</p>
  
  <pre><code>View view = findViewById(R.layout.voice_recog);
      view.setOnTouchListener(new View.OnTouchListener() {
  
          @Override
          public boolean onTouch(View v, MotionEvent event) {
              // TODO Auto-generated method stub
              Toast toast = Toast.makeText(getApplicationContext(),"Touch recognised",Toast.LENGTH_LONG);
              toast.show();
              startVoiceRecognitionActivity();
  
              return false;
          }
      });
  </code></pre>
  
  <p>I found that the issue is regarding assigning the view...Application is crashing because of source not found error...on line</p>
  
  <pre><code>    View view = findViewById(R.layout.voice_recog);
      //crashes on below line ....with Source not found error
      view.setOnTouchListener(new View.OnTouchListener() {
  </code></pre>