mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
Implemented Confirm Password and quantity fetching from shopping list v.1
This commit is contained in:
parent
7a210f5ac9
commit
e7d2ec333a
@ -89,7 +89,7 @@ public class ListPage extends AppCompatActivity {
|
||||
pNames.add(item.getDescription());
|
||||
pStores.add("Kroger");
|
||||
pPrices.add(item.getPrice().toString());
|
||||
pQuantity.add("1");
|
||||
pQuantity.add(entry.getQuantity().toString());
|
||||
pImages.add(R.drawable.placeholder);
|
||||
pListItemPair.add(entry);
|
||||
}
|
||||
|
||||
@ -39,9 +39,17 @@ public class SignupPage extends AppCompatActivity implements CodePage.CodeDialog
|
||||
public void onClick(View v) {
|
||||
EditText emailText = (EditText) findViewById(R.id.editTextTextEmailAddress);
|
||||
EditText passwordText = (EditText) findViewById(R.id.editTextTextPassword);
|
||||
EditText confirmPasswordText = (EditText) findViewById(R.id.editTextTextPassword2);
|
||||
|
||||
String email = emailText.getText().toString();
|
||||
String password = passwordText.getText().toString();
|
||||
String confirmPassword = confirmPasswordText.getText().toString();
|
||||
|
||||
if(!password.equals(confirmPassword)) {
|
||||
TextView invalidCred = findViewById(R.id.textView3);
|
||||
invalidCred.setText("\"Confirm Password\" does not match \"Password\".");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
am.startSignUp(email, password);
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
android:text="Sign up"
|
||||
app:layout_constraintEnd_toStartOf="@+id/textView3"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword2" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button1"
|
||||
@ -27,27 +27,27 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextPersonName"
|
||||
android:id="@+id/editTextTextPassword"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="23dp"
|
||||
android:ems="10"
|
||||
android:hint="Username"
|
||||
android:hint="Password"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintStart_toStartOf="@+id/editTextTextEmailAddress"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextEmailAddress" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextPassword"
|
||||
android:id="@+id/editTextTextPassword2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:layout_marginTop="26dp"
|
||||
android:ems="10"
|
||||
android:hint="Password"
|
||||
android:hint="Confirm Password"
|
||||
android:inputType="textPassword"
|
||||
app:layout_constraintEnd_toEndOf="@+id/editTextTextPersonName"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName" />
|
||||
app:layout_constraintEnd_toEndOf="@+id/editTextTextPassword"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextEmailAddress"
|
||||
@ -75,6 +75,7 @@
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:text=""
|
||||
app:layout_constraintBottom_toTopOf="@+id/button2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user