Commit ce96debb authored by james.clarke2's avatar james.clarke2

Delete Login.java

parent 09d9a9e0
package com.example.carrentals;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
public abstract class Login extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
}
public void welcomePage(View v) {
EditText userName = (EditText) findViewById(R.id.userNameTxt);
EditText password = (EditText) findViewById(R.id.passwordTxt);
myDBConnector objDBConnector = new myDBConnector(this, null, null, 1);
if (objDBConnector.checkLogin(userName.getText().toString(), password.getText().toString())) {
Intent intent = new Intent(this, Welcome.class);
startActivity(intent);
} else {
Toast.makeText(getApplicationContext(),
"Unsuccessful login \nIncorrect credentials", Toast.LENGTH_LONG).show();
}
}
public void Welcome(View v) {
Intent intent = new Intent(this, Welcome.class);
startActivity(intent);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment