title: setOnClickListener error - cannot resolve symbol
body: <p>I want to create a button which, when clicked, it will show another intent.</p>
  
  <p>This is the code:</p>
  
  <pre><code>   &lt;Button
      android:text="Bine ati venit!"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:id="@+id/button1"
      android:background="#479fc7"
      android:textSize="40dp"
      android:textColor="@color/colorPrimaryDark"
      android:textStyle="normal|bold|italic"
      android:textAllCaps="false"
      android:fontFamily="casual"
      android:onClick="next_page"/&gt;
  </code></pre>
  
  <p>and from the .java class:</p>
  
  <pre><code>    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_welcome);
  }
  
  Button button = (Button) findViewById(R.id.button1);
  
  button.setOnClickListener( new View.OnClickListener()
  {
      public void onClick (View v){
      next_page(v);
  }
  });
  
  public void next_page(View v) {
      Intent intent = new Intent(this, MapsActivity.class);
      startActivity(intent);
  }
  </code></pre>
  
  <p>I get the errors:
  "Cannot resolve symbol 'setOnClickListener'", "variable onClick is never used", "; expected"....</p>