From 0aa80b514f36686235127adcd5430ef892873465 Mon Sep 17 00:00:00 2001 From: Clayton Wilson Date: Sat, 14 Nov 2020 23:15:57 -0500 Subject: [PATCH] Updating quantities no longer scrolls the list --- Listify/app/src/main/java/com/example/listify/ListPage.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Listify/app/src/main/java/com/example/listify/ListPage.java b/Listify/app/src/main/java/com/example/listify/ListPage.java index c2d3db5..3fb83af 100644 --- a/Listify/app/src/main/java/com/example/listify/ListPage.java +++ b/Listify/app/src/main/java/com/example/listify/ListPage.java @@ -343,7 +343,7 @@ public class ListPage extends AppCompatActivity implements Requestor.Receiver { catch (Exception e) { Log.i("Authentication", e.toString()); } - listView.setAdapter(myAdapter); + myAdapter.notifyDataSetChanged(); } }); if(Integer.parseInt(pQuantity.get(position)) <= 1) { @@ -378,7 +378,7 @@ public class ListPage extends AppCompatActivity implements Requestor.Receiver { catch (Exception e) { Log.i("Authentication", e.toString()); } - listView.setAdapter(myAdapter); + myAdapter.notifyDataSetChanged(); } }); if(Integer.parseInt(pQuantity.get(position)) > 1) { @@ -404,7 +404,7 @@ public class ListPage extends AppCompatActivity implements Requestor.Receiver { pImages.remove(position); requestor.deleteObject(pListItemPair.remove(position)); - listView.setAdapter(myAdapter); + myAdapter.notifyDataSetChanged(); } });