title: onClick method doesn't trigger when i click the Views
body: <pre><code>package com.example.sudoku;
  
  
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View;
  
  import android.view.View.OnClickListener;
  
  public class Sudoku extends Activity implements OnClickListener{
      @Override 
      public void onCreate(Bundle savedInstanceState){
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          // Set up click listeners for all the buttons
          View continueButton=findViewById(R.id.continue_button);
          continueButton.setOnClickListener(this);
          View newButton=findViewById(R.id.new_button);
          newButton.setOnClickListener(this); 
          View aboutButton=findViewById(R.id.about_button);
          aboutButton.setOnClickListener(Sudoku.this);
          View exitButton=findViewById(R.id.exit_button);
          exitButton.setOnClickListener(Sudoku.this);
      }
  
      @Override
      public void onClick(View v) {
          switch (v.getId()){
          case R.id.about_button:
              Intent i=new Intent(Sudoku.this, About.class);
              startActivity(i);
              break;
          case R.id.exit_button:
              finish();
              break;
          }
  
      }
  
  } 
  </code></pre>
  
  <p>when i click views-buttons nothing happens 
  i know that views-buttons are not connected with the on click method at all because when i define on click method into the x m l file it works fine,any help please i am new to android programming,thnx</p>