mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
Merge pull request #21 from ClaytonWWilson/aaron-branch
Added Code page and restructured the button flow
This commit is contained in:
commit
5f05c8bc26
@ -34,6 +34,7 @@
|
||||
<activity android:name="com.example.listify.ui.LoginPage" />
|
||||
<activity android:name="com.example.listify.ui.ForgotPasswordPage" />
|
||||
<activity android:name="com.example.listify.ui.ResetPasswordPage" />
|
||||
<activity android:name="com.example.listify.ui.CodePage" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@ -0,0 +1,39 @@
|
||||
package com.example.listify.ui;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import com.example.listify.R;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class CodePage extends AppCompatActivity {
|
||||
private Button button1; //Reset password page button
|
||||
private Button button2; //Cancel button
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_code);
|
||||
|
||||
button1 = (Button) findViewById(R.id.button1);
|
||||
button1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(CodePage.this, ResetPasswordPage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
button2 = (Button) findViewById(R.id.button2);
|
||||
button2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(CodePage.this, LoginPage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -10,18 +10,18 @@ import com.example.listify.R;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class ForgotPasswordPage extends AppCompatActivity {
|
||||
private Button button;
|
||||
private Button button1; //Code page button
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_forgotpswd);
|
||||
|
||||
button = (Button) findViewById(R.id.button4);
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
button1 = (Button) findViewById(R.id.button1);
|
||||
button1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ForgotPasswordPage.this, ResetPasswordPage.class);
|
||||
Intent intent = new Intent(ForgotPasswordPage.this, CodePage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
@ -6,24 +6,45 @@ import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import com.example.listify.R;
|
||||
import com.example.listify.MainActivity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class LoginPage extends AppCompatActivity {
|
||||
private Button button;
|
||||
private Button button1; //Sign up page button
|
||||
private Button button2; //Forgot password button
|
||||
private Button button3; //Log in button
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login);
|
||||
|
||||
button = (Button) findViewById(R.id.button3);
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
button1 = (Button) findViewById(R.id.button1);
|
||||
button1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(LoginPage.this, SignupPage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
button2 = (Button) findViewById(R.id.button2);
|
||||
button2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(LoginPage.this, ForgotPasswordPage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
button3 = (Button) findViewById(R.id.button3);
|
||||
button3.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(LoginPage.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -6,23 +6,22 @@ import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import com.example.listify.R;
|
||||
import com.example.listify.MainActivity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class ResetPasswordPage extends AppCompatActivity {
|
||||
private Button button;
|
||||
private Button button1; //Log in page button
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_resetpswd);
|
||||
|
||||
button = (Button) findViewById(R.id.button5);
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
button1 = (Button) findViewById(R.id.button1);
|
||||
button1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ResetPasswordPage.this, MainActivity.class);
|
||||
Intent intent = new Intent(ResetPasswordPage.this, LoginPage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
@ -6,22 +6,33 @@ import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import com.example.listify.R;
|
||||
import com.example.listify.MainActivity;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class SignupPage extends AppCompatActivity {
|
||||
private Button button;
|
||||
private Button button1; //Log in page button
|
||||
private Button button2; //Sign up button
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_signup);
|
||||
|
||||
button = (Button) findViewById(R.id.button2);
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
button1 = (Button) findViewById(R.id.button1);
|
||||
button1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(SignupPage.this, com.example.listify.ui.LoginPage.class);
|
||||
Intent intent = new Intent(SignupPage.this, LoginPage.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
button2 = (Button) findViewById(R.id.button2);
|
||||
button2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(SignupPage.this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
|
||||
@ -2,16 +2,13 @@ package com.example.listify.ui.home;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import android.view.ViewGroup;
|
||||
import android.view.LayoutInflater;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.lifecycle.ViewModelProviders;
|
||||
|
||||
import com.example.listify.R;
|
||||
|
||||
|
||||
48
Listify/app/src/main/res/layout/activity_code.xml
Normal file
48
Listify/app/src/main/res/layout/activity_code.xml
Normal file
@ -0,0 +1,48 @@
|
||||
<?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">
|
||||
|
||||
<Button
|
||||
android:id="@+id/button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="Submit"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextNumber" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="22dp"
|
||||
android:text="Cancel"
|
||||
app:layout_constraintStart_toStartOf="@+id/button1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextNumber"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="17dp"
|
||||
android:ems="10"
|
||||
android:hint="Code"
|
||||
android:inputType="number"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="31dp"
|
||||
android:layout_marginTop="260dp"
|
||||
android:text="Please enter the 6-digit code from the email sent to you."
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -6,7 +6,7 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/button4"
|
||||
android:id="@+id/button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="31dp"
|
||||
|
||||
@ -10,54 +10,62 @@
|
||||
android:id="@+id/button3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginTop="53dp"
|
||||
android:text="Log in"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/button2" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextPersonName"
|
||||
<Button
|
||||
android:id="@+id/button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:ems="10"
|
||||
android:hint="Username or email"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintEnd_toEndOf="@+id/textView3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView3" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextPassword"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:ems="10"
|
||||
android:hint="Password"
|
||||
android:inputType="textPassword"
|
||||
app:layout_constraintStart_toStartOf="@+id/editTextTextPersonName"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:text="Log in"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="324dp"
|
||||
android:layout_marginTop="274dp"
|
||||
android:text="New to Listify? Click here to sign up."
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="72dp"
|
||||
android:text="Forgot password? Click here."
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextPersonName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="21dp"
|
||||
android:ems="10"
|
||||
android:hint="Username or email"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="@+id/editTextTextPassword"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button1" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextPassword"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:ems="10"
|
||||
android:hint="Password"
|
||||
android:inputType="textPassword"
|
||||
app:layout_constraintBottom_toTopOf="@+id/button2"
|
||||
app:layout_constraintStart_toStartOf="@+id/button2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="26dp"
|
||||
android:text="Log in"
|
||||
app:layout_constraintBottom_toTopOf="@+id/button1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -6,7 +6,7 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/button5"
|
||||
android:id="@+id/button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
|
||||
@ -16,18 +16,15 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextPersonName"
|
||||
<Button
|
||||
android:id="@+id/button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="32dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:ems="10"
|
||||
android:hint="Email"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView3" />
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginTop="288dp"
|
||||
android:text="Already have an account? Click here to log in."
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextEmailAddress"
|
||||
@ -51,29 +48,26 @@
|
||||
app:layout_constraintStart_toStartOf="@+id/editTextTextEmailAddress"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextEmailAddress" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextPersonName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="28dp"
|
||||
android:ems="10"
|
||||
android:hint="Email"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/button1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="86dp"
|
||||
android:layout_marginLeft="86dp"
|
||||
android:layout_marginRight="86dp"
|
||||
android:layout_marginStart="86dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:text="Sign up"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textView3"
|
||||
app:layout_constraintEnd_toEndOf="@+id/textView3"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="@+id/editTextTextPersonName" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="324dp"
|
||||
android:text="Already have an account? Click here to log in."
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintBottom_toTopOf="@+id/button1"
|
||||
app:layout_constraintEnd_toEndOf="@+id/button1"
|
||||
app:layout_constraintStart_toStartOf="@+id/button1" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Loading…
Reference in New Issue
Block a user