The **Home** `Activity` where the login button is 

```
package com.example.james.assignment1_18094969;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View.OnClickListener;
import android.view.View;
import android.content.Intent;

public class Home extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);

        //findview for the login button 
        findViewById(R.id.button_login).setOnClickListener(new login());
    }

```

`onClickListener` for the login button to be clicked and take the user to the login page.

```
    class login implements OnClickListener {
        public void onClick(View v) {
            Intent intent = new Intent(Home.this, login.class);
            startActivity(intent);
        }
    }
}

```

The login screen:

```
package com.example.james.assignment1_18094969;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class Login extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
    }
}

```