mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
commit
cd13f96be4
@ -38,11 +38,13 @@ public class ListPage extends AppCompatActivity {
|
||||
Button decrQuan;
|
||||
Button removeItem;
|
||||
|
||||
ArrayList<String> pNames = new ArrayList<>(); //String[] pNames = {"Half-gallon organic whole milk"};
|
||||
ArrayList<String> pStores = new ArrayList<>(); //String[] pStores = {"Kroger"};
|
||||
ArrayList<String> pPrices = new ArrayList<>(); //String[] pPrices = {"$5.00"};
|
||||
ArrayList<String> pQuantity = new ArrayList<>(); //String[] pQuantity = {"1"};
|
||||
ArrayList<Integer> pImages = new ArrayList<>(); //int[] pImages = {R.drawable.milk};
|
||||
ArrayList<String> pNames = new ArrayList<>();
|
||||
ArrayList<String> pStores = new ArrayList<>();
|
||||
ArrayList<String> pPrices = new ArrayList<>();
|
||||
ArrayList<String> pQuantity = new ArrayList<>();
|
||||
ArrayList<Integer> pImages = new ArrayList<>();
|
||||
|
||||
ArrayList<ListEntry> pListItemPair = new ArrayList<>();
|
||||
|
||||
Requestor requestor;
|
||||
|
||||
@ -93,7 +95,7 @@ public class ListPage extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
pNames.add("Half-gallon organic whole milk");
|
||||
/*pNames.add("Half-gallon organic whole milk");
|
||||
pStores.add("Kroger");
|
||||
pPrices.add("$5.00");
|
||||
pQuantity.add("1");
|
||||
@ -109,7 +111,7 @@ public class ListPage extends AppCompatActivity {
|
||||
pStores.add("Kroger");
|
||||
pPrices.add("$7.00");
|
||||
pQuantity.add("1");
|
||||
pImages.add(R.drawable.peanutbutter);
|
||||
pImages.add(R.drawable.peanutbutter);*/
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_list);
|
||||
@ -122,11 +124,11 @@ public class ListPage extends AppCompatActivity {
|
||||
|
||||
class MyAdapter extends ArrayAdapter<String> {
|
||||
Context context;
|
||||
ArrayList<String> pNames; //String[] pNames;
|
||||
ArrayList<String> pStores; //String[] pStores;
|
||||
ArrayList<String> pPrices; //String[] pPrices;
|
||||
ArrayList<String> pQuantity; //String[] pQuantity;
|
||||
ArrayList<Integer> pImages; //int[] pImages;
|
||||
ArrayList<String> pNames;
|
||||
ArrayList<String> pStores;
|
||||
ArrayList<String> pPrices;
|
||||
ArrayList<String> pQuantity;
|
||||
ArrayList<Integer> pImages;
|
||||
|
||||
MyAdapter (Context c, ArrayList<String> names, ArrayList<String> stores, ArrayList<String> prices, ArrayList<String> quantity, ArrayList<Integer> images) {
|
||||
super(c, R.layout.listproduct, R.id.productView, names);
|
||||
@ -186,6 +188,9 @@ public class ListPage extends AppCompatActivity {
|
||||
pPrices.remove(position);
|
||||
pQuantity.remove(position);
|
||||
pImages.remove(position);
|
||||
|
||||
//requestor.deleteObject("39", ListEntry.class);
|
||||
|
||||
listView.setAdapter(myAdapter);
|
||||
}
|
||||
});
|
||||
@ -216,6 +221,7 @@ public class ListPage extends AppCompatActivity {
|
||||
ProductReceiver<Item> pr = new ProductReceiver<>();
|
||||
requestor.getObject(Integer.toString(product), Item.class, pr);
|
||||
pQuantity.add("1");
|
||||
pListItemPair.add(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,6 +15,9 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
public class ForgotPasswordPage extends AppCompatActivity implements CodePage.CodeDialogListener {
|
||||
private Button button1; //Code page button
|
||||
|
||||
String email;
|
||||
String newPassword;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@ -25,7 +28,11 @@ public class ForgotPasswordPage extends AppCompatActivity implements CodePage.Co
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
EditText emailText = (EditText) findViewById(R.id.editTextTextEmailAddress2);
|
||||
String email = emailText.getText().toString();
|
||||
EditText newPasswordText = (EditText) findViewById(R.id.editTextTextPassword2);
|
||||
|
||||
email = emailText.getText().toString();
|
||||
newPassword = newPasswordText.getText().toString();
|
||||
|
||||
try {
|
||||
am.changePassword(email);
|
||||
}
|
||||
@ -46,7 +53,7 @@ public class ForgotPasswordPage extends AppCompatActivity implements CodePage.Co
|
||||
public void sendCode(String code, boolean cancel) {
|
||||
if(!cancel) {
|
||||
try {
|
||||
am.confirmPasswordReset("qwertyuiop", code);
|
||||
am.confirmPasswordReset(newPassword, code);
|
||||
}
|
||||
catch (Exception e) {
|
||||
Log.i("Authentication", e.toString());
|
||||
|
||||
@ -9,29 +9,40 @@
|
||||
android:id="@+id/button1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="31dp"
|
||||
android:layout_marginTop="27dp"
|
||||
android:text="Button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextEmailAddress2" />
|
||||
app:layout_constraintEnd_toEndOf="@+id/editTextTextPassword2"
|
||||
app:layout_constraintStart_toStartOf="@+id/editTextTextPassword2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword2" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextEmailAddress2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="295dp"
|
||||
android:ems="10"
|
||||
android:hint="Email"
|
||||
android:inputType="textEmailAddress"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editTextTextPassword2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="31dp"
|
||||
android:ems="10"
|
||||
android:hint="New Password"
|
||||
android:inputType="textPassword"
|
||||
app:layout_constraintStart_toStartOf="@+id/editTextTextEmailAddress2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editTextTextEmailAddress2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="31dp"
|
||||
android:layout_marginBottom="34dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:text="Please enter your email address."
|
||||
app:layout_constraintBottom_toTopOf="@+id/editTextTextEmailAddress2"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user