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