1 of 2 Button Working in an android app home page
<p>I made a basic homepage for my app.
The page consists of a sign in and sign up button.</p>

<p>Only the signup button works. I'm fairly new to android development and I guess I just can see why this is happening.</p>

<p>I checked other questions on stack overflow and decided to make a private handler and then cases however I still have the same problem.</p>

<p>Here is the code. Any help and insight as to why this is happening is much appreciated.</p>

<pre><code>package net.citrusdynamics.citrus;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button signin = (Button) findViewById(R.id.signin);
        Button signup = (Button) findViewById(R.id.signup);

        signin.setOnClickListener(onclicklistener);
        signup.setOnClickListener(onclicklistener);

    }

    private View.OnClickListener onclicklistener = new View.OnClickListener() {
        @Override
        public void onClick(final View v) {
            switch (v.getId()) {
                case R.id.signin:
                    setContentView(R.layout.activity_signin);
                    Intent signin_intent = new Intent(MainActivity.this, SigninActivity.class);
                    startActivity(signin_intent);
                    break;
                case R.id.signup:
                    setContentView(R.layout.activity_signup);
                    Intent signup_intent = new Intent(MainActivity.this, SignupActivity.class);
                    startActivity(signup_intent);

                    break;

            }
        }
    };
}
</code></pre>