title: Support to setup onclick method for my login button
body: <p>I'm brand new to this whole android coding and im trying to setup a login page for my app. I created the login button and im trying to setup the onClick thing for it but its not working. Ill paste my java file below</p>
  
  <pre><code>package com.example.user_000.appname;
  
  import android.widget.EditText;
  import android.view.View;
  
  
  public class onClick {
  
      EditText username = (EditText)findViewById(R.id.username);
      EditText password = (EditText)findViewById(R.id.password);
  
      public void login(View view){
          if(username.getText().toString().equals("admin") &amp;&amp; password.getText().toString().equals("admin")){
              //correcct password
          } else {
              //wrong password
          } 
      }
  }
  </code></pre>