Commit 328e75ce authored by lucy.hemingway's avatar lucy.hemingway

working log in system

parent f91b79f3
......@@ -9,12 +9,12 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.APPPPPpp">
<activity android:name=".Booking"></activity>
<activity android:name=".Registration"></activity>
<activity android:name=".LogIn" />
<activity android:name=".Booking" />
<activity android:name=".fulldetails" />
<activity android:name=".MuseumList" />
<activity android:name=".HelpPage" />
<activity android:name=".Register" />
<activity android:name=".LogIn" />
<activity android:name=".MainMenu">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......
......@@ -2,14 +2,68 @@ package com.example.appppppp;
import androidx.appcompat.app.AppCompatActivity;
import android.app.DatePickerDialog;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.nfc.Tag;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.DatePicker;
import android.widget.TextView;
import org.w3c.dom.Text;
import java.util.Calendar;
import java.util.Date;
public class Booking extends AppCompatActivity {
private static final String TAG = "Booking";
TextView Date;
DatePickerDialog.OnDateSetListener SetDate;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_booking);
Intent intent = getIntent();
String museumselected = intent.getStringExtra(fulldetails.mname);
int fee = intent.getIntExtra(String.valueOf(fulldetails.price), 0);
TextView museumname = (TextView)findViewById(R.id.Museumname);
museumname.setText(museumselected);
Date = (TextView) findViewById(R.id.selectdate);
Date.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Calendar calendar = Calendar.getInstance();
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH);
int day = calendar.get(Calendar.DAY_OF_MONTH);
DatePickerDialog picker = new DatePickerDialog(Booking.this,
android.R.style.Theme_Holo_Light_Dialog_MinWidth, SetDate,
year,month,day);
picker.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
picker.show();
}
});
SetDate = new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
Log.d(TAG,"OnDateSet: Date: " + year + "/" + month + "/" + dayOfMonth);
}
};
}
}
\ No newline at end of file
package com.example.appppppp;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import androidx.annotation.Nullable;
public class DBconnect extends SQLiteOpenHelper {
private static final int db_version = 1;
private static final String db_name = "Registered.db";
private static final String table_users = "Users";
private static final String column_id = "ID";
private static final String column_name = "First Name";
private static final String column_last = "Last Name";
private static final String column_email = "Email";
private static final String column_pass = "Password";
public DBconnect(Context context, String name,SQLiteDatabase.CursorFactory factory, int version) {
super(context, db_name, factory, db_version);
}
@Override
public void onCreate(SQLiteDatabase db) {
//create table for storing users
String create = "CREATE TABLE " +
table_users + "(" +
column_id + "INTEGER PRIMARY KEY," +
column_name + "TEXT," +
column_last + "TEXT," +
column_email + "TEXT," +
column_pass + "INTEGER" + ")";
//create
db.execSQL(create);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
public void addNew(String name,String last, String email, String password){
ContentValues values = new ContentValues();
values.put(column_name, name);
values.put(column_last, last);
values.put(column_email, email);
values.put(column_pass,password);
SQLiteDatabase db = this.getWritableDatabase();
db.insert(table_users, null, values);
db.close();
}
public boolean check(String Email, String password){
//check password variable
boolean checked = false;
//query check email
String email = "SELECT * FROM " + table_users + "WHERE " + column_email +
"= \"" + Email + "\"";
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(email, null);
if ( cursor.moveToFirst()) {
if(cursor.getString(4).equals(password) ) {
checked = true;
}
} else {
checked = false;
}
cursor.close();
db.close();
return checked;
}
public String find(String Email){
//store result
String f = null;
String query = "SELECT * FROM " + table_users + "WHERE " + column_email +
"= \"" + Email + "\"";
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(query, null);
if (cursor.moveToFirst()){
f = Integer.parseInt(cursor.getString(0)) +
cursor.getString(1) +
cursor.getString(2) +
cursor.getString(3) +
cursor.getString(4);
}
cursor.close();
db.close();
return f;
}
}
......@@ -5,20 +5,49 @@ import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class LogIn extends AppCompatActivity {
EditText email1,password2;
Button login;
dbconnect db;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_log_in);
}
public void toMenu (View V){
Intent back = new Intent(this, MainMenu.class);
startActivity(back);
}
public void toMuseums (View V){
Intent back = new Intent(this, MuseumList.class);
startActivity(back);
db = new dbconnect(this);
email1 = (EditText)findViewById(R.id.emaillog);
password2 = (EditText)findViewById(R.id.passwordlog);
login = (Button)findViewById(R.id.loginlog);
login.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
String email = email1.getText().toString();
String Password = password2.getText().toString();
boolean registered = db.registered(email,Password);
if (registered==true){
//change to go to museum list
Intent intent = new Intent(LogIn.this, MuseumList.class);
startActivity(intent);
}
else{
Toast.makeText(getApplicationContext(),"Incorrect Email/Password, try again",Toast.LENGTH_LONG).show();
}
}
});
}
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ public class MainMenu extends AppCompatActivity {
setContentView(R.layout.activity_main_menu);
}
public void toRegister(View V){
Intent Registerpage = new Intent(this,Register.class );
Intent Registerpage = new Intent(this,Registration.class );
startActivity(Registerpage);
}
public void toLogIn( View V){
......
......@@ -5,6 +5,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.os.Bundle;
import android.widget.Toast;
import java.util.ArrayList;
......@@ -19,6 +20,7 @@ public class MuseumList extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_museum_list);
Toast.makeText(getApplicationContext(), "Welcome, you are logged in.", Toast.LENGTH_LONG).show();
// data to populate the recyclerview with
......
package com.example.appppppp;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class Register extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
}
public void toMenu (View V){
Intent back = new Intent(this, MainMenu.class);
startActivity(back);
}
}
\ No newline at end of file
package com.example.appppppp;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class Registration extends AppCompatActivity {
dbconnect db;
EditText text1, text2,text3;
Button register;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_registration);
db = new dbconnect(this);
text1 = (EditText)findViewById(R.id.email);
text2 = (EditText)findViewById(R.id.pass);
text3 = (EditText)findViewById(R.id.repass);
register = (Button)findViewById(R.id.register);
register.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String email = text1.getText().toString();
String password = text2.getText().toString();
String repass = text3.getText().toString();
if (email.equals("") || password.equals("") || repass.equals("")) {
Toast.makeText(getApplicationContext(), "One or more missing fields!", Toast.LENGTH_LONG).show();
}
else{
if(password.equals(repass)){
boolean checkE = db.checkE(email);
//add the new user
if(checkE==true){
boolean addtotable = db.addnewuser(email,password);
//take user to login page as they have registered
if (addtotable==true){
Intent intent = new Intent(Registration.this, LogIn.class);
startActivity(intent);
}
}
//if the email is already in the database, do not add to the database
// tell user the email is used already
else{
Toast.makeText(getApplicationContext(),"Email is already registered, please log in.",Toast.LENGTH_LONG).show();
}
}
//passwords not matching
}
}
});
}
}
\ No newline at end of file
package com.example.appppppp;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import androidx.annotation.Nullable;
//class created with help from Lecture 08 = Accessing Database
//class created with help from "Login and Register | Sqlite Database | Android Studio | Part 1" Youtube Video https://www.youtube.com/watch?v=1WPAXHhG6u0
public class dbconnect extends SQLiteOpenHelper {
public dbconnect(Context context) {
super(context, "register.db", null, 1);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("CREATE TABLE users(ID integer primary key,FirstName text, LastName text, Email text,Password integer) ");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("drop table if exists users");
}
public boolean addnewuser(String email, String password) {
SQLiteDatabase data = this.getWritableDatabase();
ContentValues content = new ContentValues();
content.put("email",email);
content.put("password",password);
long inserttousers = data.insert("users",null,content);
if (inserttousers== -1)return false;
else return true;
}
public boolean checkE(String email){
SQLiteDatabase data = this.getReadableDatabase();
Cursor cursor = data.rawQuery("SELECT * FROM users WHERE email=?", new String[]{email});
if(cursor.getCount()>0) return false;
else return true;
}
//check email and password is on the database to log in
public boolean registered(String Email, String Password){
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery("SELECT * FROM users WHERE email=? AND password=?",new String[]{Email,Password});
if (cursor.getCount()>0) return true;
else return false;
}
}
......@@ -5,11 +5,19 @@ import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
public class fulldetails extends AppCompatActivity {
//variables for next page if this museum is selected
public static String mname = "";
public static int price = 0;
Button bookthis;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......@@ -19,121 +27,195 @@ public class fulldetails extends AppCompatActivity {
((TextView)findViewById(R.id.check)).setText(selectedMuseum);
setDetail(selectedMuseum);
setvariables(selectedMuseum);
}
void setDetail(String s){
//variables for next page if this museum is selected
String mname = "";
int price = 0;
int i = 0;
switch(s) {
case "Louvre":
mname = "Louvre";
price = 10;
i = 1;
// mname = "Louvre";
// price = 10;
// i = 1;
((ImageView)findViewById(R.id.theimage)).setImageResource(R.drawable.louvre);
((TextView)findViewById(R.id.thetext)).setText( "The Louvre asdaskjhdasdlkasda al s dlasdajsdjasjd jka ");
break;
case "National Museum of China":
mname="National Museum of China";
price=10;
i=2;
// mname="National Museum of China";
// price=10;
// i=2;
((ImageView)findViewById(R.id.theimage)).setImageResource(R.drawable.china);
((TextView)findViewById(R.id.thetext)).setText( "China asdaskjhdasdlkasda al s dlasdajsdjasjd jka ");
break;
case "Vatican Museums":
mname="Vatican Museums";
price=10;
i= 3;
// mname="Vatican Museums";
// price=10;
// i= 3;
((ImageView)findViewById(R.id.theimage)).setImageResource(R.drawable.vatican);
((TextView)findViewById(R.id.thetext)).setText( "Vatican d jka ");
break;
case "Metropolitan Museum of Art":
mname = "Metropolitan Museum of Art";
price= 10;
i = 4;
// mname = "Metropolitan Museum of Art";
// price= 10;
// i = 4;
((ImageView)findViewById(R.id.theimage)).setImageResource(R.drawable.metropolitan);
((TextView)findViewById(R.id.thetext)).setText( "The metropolitan asdaskjhdasdlkasda al s dlasdajsdjasjd jka ");
break;
case "British Museum":
mname = "British Museum";
price= 10;
i = 5;
// mname = "British Museum";
// price= 10;
//i = 5;
((ImageView)findViewById(R.id.theimage)).setImageResource(R.drawable.british);
((TextView)findViewById(R.id.thetext)).setText( "The metropolitan asdaskjhdasdlkasda al s dlasdajsdjasjd jka ");
break;
case "Tate Modern":
mname = "Tate Modern";
price= 5;
i = 6;
// mname = "Tate Modern";
// price= 5;
// i = 6;
((ImageView)findViewById(R.id.theimage)).setImageResource(R.drawable.tate);
((TextView)findViewById(R.id.thetext)).setText( "The metropolitan asdaskjhdasdlkasda al s dlasdajsdjasjd jka ");
break;
case "National Gallery":
mname = "National Gallery";
price= 5;
i = 7;
// mname = "National Gallery";
// price= 5;
// i = 7;
((ImageView)findViewById(R.id.theimage)).setImageResource(R.drawable.national);
((TextView)findViewById(R.id.thetext)).setText( "The metropolitan asdaskjhdasdlkasda al s dlasdajsdjasjd jka ");
break;
case "Natural History Museum":
mname = "Natural History Museum";
price= 5;
i = 8;
// mname = "Natural History Museum";
// price= 5;
// i = 8;
((ImageView)findViewById(R.id.theimage)).setImageResource(R.drawable.natural);
((TextView)findViewById(R.id.thetext)).setText( "The metropolitan asdaskjhdasdlkasda al s dlasdajsdjasjd jka ");
break;
case "American Museum of Natural History":
mname = "American Museum of Natural History";
price= 5;
i = 9;
// mname = "American Museum of Natural History";
// price= 5;
// i = 9;
((ImageView)findViewById(R.id.theimage)).setImageResource(R.drawable.american);
((TextView)findViewById(R.id.thetext)).setText( "The metropolitan asdaskjhdasdlkasda al s dlasdajsdjasjd jka ");
break;
case "State Hermitage Museum":
mname = "State Hermitage Museum";
price= 5;
i = 10;
// mname = "State Hermitage Museum";
// price= 5;
// i = 10;
((ImageView)findViewById(R.id.theimage)).setImageResource(R.drawable.state);
((TextView)findViewById(R.id.thetext)).setText( "The metropolitan asdaskjhdasdlkasda al s dlasdajsdjasjd jka ");
break;
default:
((TextView)findViewById(R.id.thetext)).setText("Not Added");
break;
}
//send price and name of museum to next page when pressing book now button
//send price and name of museum to next page
// Bundle n = getIntent().getExtras();
// Intent book = new Intent (this, Booking.class);
// book.putExtra("mname", mname);
// book.putExtra("price",price);
// book.putExtra("i",i);
}
public void setvariables(String museum){
if(museum.equals("Louvre")){
price = 10;
mname = "louvre";
}
else if (museum.equals("National Museum of China")){
price = 10;
mname = "National Museum of China";
}
else if (museum.equals("Vatican Museums")){
price = 10;
mname = "Vatican Museums";
}
else if (museum.equals("Metropolitan Museum of Art")){
price = 10;
mname = "Metropolitan Museum of Art";
}
else if (museum.equals("British Museum")){
price = 10;
mname = "British Museum";
}
else if (museum.equals("Tate Modern")){
price = 5;
mname = "Tate Modern";
}
else if (museum.equals("National Gallery")){
price = 5;
mname = "National Gallery";
}
else if (museum.equals("Natural History Museum")){
price = 5;
mname = "Natural History Museum";
}
else if (museum.equals("American Museum of Natural History")){
price = 5;
mname = "American Museum of Natural History";
}
else if (museum.equals("State Hermitage Museum")){
price = 5;
mname = "State Hermitage Museum";
}
Bundle n = getIntent().getExtras();
Intent book = new Intent (this, Booking.class);
book.putExtra("museumname", mname);
book.putExtra("fee",price);
book.putExtra("number",i);
book.putExtra("mname", mname);
book.putExtra("price",price);
bookthis = (Button)findViewById(R.id.book);
bookthis.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(book);
}
});
}
}
......@@ -7,26 +7,28 @@
tools:context=".Booking">
<TextView
android:id="@+id/name1"
android:id="@+id/Museumname"
android:layout_width="192dp"
android:layout_height="32dp"
android:text="TextView"
android:text="Museum"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.169"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.089" />
app:layout_constraintVertical_bias="0.077" />
<CalendarView
android:id="@+id/calendarView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="42dp"
<TextView
android:id="@+id/selectdate"
android:layout_width="170dp"
android:layout_height="44dp"
android:text="Select a Date"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.491"
app:layout_constraintHorizontal_bias="0.543"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/name1"
app:layout_constraintVertical_bias="0.023" />
app:layout_constraintTop_toBottomOf="@+id/Museumname"
app:layout_constraintVertical_bias="0.356" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -43,7 +43,7 @@
tools:srcCompat="@tools:sample/avatars" />
<Button
android:id="@+id/button9"
android:id="@+id/book"
android:layout_width="124dp"
android:layout_height="42dp"
android:layout_marginTop="49dp"
......
......@@ -6,92 +6,44 @@
android:layout_height="match_parent"
tools:context=".LogIn">
<Button
android:id="@+id/button4"
android:layout_width="126dp"
android:layout_height="41dp"
android:layout_marginBottom="328dp"
android:onClick="toMuseums"
android:text="Enter"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent" />
<EditText
android:id="@+id/editTextTextPassword"
android:id="@+id/passwordlog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:ems="10"
android:inputType="textPassword"
app:layout_constraintBottom_toTopOf="@+id/button4"
android:hint="Password"
android:inputType="numberPassword"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/emaillog"
app:layout_constraintVertical_bias="0.125" />
<TextView
android:id="@+id/textView2"
<Button
android:id="@+id/loginlog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
android:text="Password"
android:layout_marginTop="79dp"
android:text="Log In"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.283"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextEmailAddress"
app:layout_constraintTop_toBottomOf="@+id/passwordlog"
app:layout_constraintVertical_bias="0.0" />
<EditText
android:id="@+id/editTextTextEmailAddress"
android:id="@+id/emaillog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="156dp"
android:ems="10"
android:inputType="textEmailAddress"
app:layout_constraintBottom_toTopOf="@+id/editTextTextPassword"
android:hint="Email"
android:inputType="textPersonName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.239" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Email"
app:layout_constraintBottom_toTopOf="@+id/editTextTextEmailAddress"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.271"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.905" />
<Button
android:id="@+id/button5"
android:layout_width="111dp"
android:layout_height="41dp"
android:layout_marginTop="16dp"
android:onClick="toMenu"
android:text="Back"
app:layout_constraintBottom_toTopOf="@+id/textView4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.053"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Log In"
android:textSize="24sp"
app:layout_constraintBottom_toTopOf="@+id/editTextTextEmailAddress"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.589" />
app:layout_constraintVertical_bias="0.256" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -45,14 +45,14 @@
android:id="@+id/button2"
android:layout_width="165dp"
android:layout_height="47dp"
android:layout_marginBottom="78dp"
android:layout_marginTop="40dp"
android:layout_marginBottom="28dp"
android:onClick="toLogIn"
android:text="Log In Here"
app:layout_constraintBottom_toBottomOf="@+id/textView"
app:layout_constraintBottom_toTopOf="@+id/button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/button"
app:layout_constraintVertical_bias="0.345" />
app:layout_constraintTop_toBottomOf="@+id/textView" />
<Button
android:id="@+id/button3"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Register">
<Button
android:id="@+id/button6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Register"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword2" />
<EditText
android:id="@+id/editTextTextPassword2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPassword"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextEmailAddress2"
app:layout_constraintVertical_bias="0.121" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Email"
app:layout_constraintBottom_toTopOf="@+id/editTextTextEmailAddress2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.268"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName2"
app:layout_constraintVertical_bias="1.0" />
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Password"
app:layout_constraintBottom_toTopOf="@+id/editTextTextPassword2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.286"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextEmailAddress2" />
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Last Name"
app:layout_constraintBottom_toTopOf="@+id/editTextTextPersonName2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.294"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName3"
app:layout_constraintVertical_bias="1.0" />
<Button
android:id="@+id/button7"
android:layout_width="94dp"
android:layout_height="35dp"
android:onClick="toMenu"
android:text="Back"
app:layout_constraintBottom_toTopOf="@+id/textView8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.088"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.307" />
<EditText
android:id="@+id/editTextTextPersonName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.217" />
<TextView
android:id="@+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="First Name"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.292"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.182" />
<EditText
android:id="@+id/editTextTextPersonName2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="456dp"
android:ems="10"
android:inputType="textPersonName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName3"
app:layout_constraintVertical_bias="1.0" />
<TextView
android:id="@+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="35dp"
android:text="Register Here"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="@+id/textView8"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.926" />
<EditText
android:id="@+id/editTextTextEmailAddress2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="364dp"
android:ems="10"
android:inputType="textEmailAddress"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName2"
app:layout_constraintVertical_bias="0.957" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Registration">
<Button
android:id="@+id/register"
android:layout_width="129dp"
android:layout_height="48dp"
android:text="Register"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/repass"
app:layout_constraintVertical_bias="0.226" />
<EditText
android:id="@+id/email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Email"
android:inputType="textPersonName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.19" />
<EditText
android:id="@+id/repass"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Re-enter Password"
android:inputType="numberPassword"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pass"
app:layout_constraintVertical_bias="0.146" />
<EditText
android:id="@+id/pass"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="56dp"
android:ems="10"
android:hint="Password"
android:inputType="numberPassword"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/email"
app:layout_constraintVertical_bias="0.017" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
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