From d78c4f13ef07e9ff56ab6f15ef4ada1d40adc972 Mon Sep 17 00:00:00 2001 From: jacques Date: Sun, 22 May 2022 18:49:10 +0200 Subject: [PATCH] Change SimpleItemRecyclerView into RecyclerView --- .../java/net/foucry/pilldroid/DrugListActivity.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java b/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java index 628f7fb..cdc5cdb 100644 --- a/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java @@ -22,6 +22,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.ImageView; +import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; @@ -73,7 +74,7 @@ public class DrugListActivity extends AppCompatActivity { private List prescriptionList; // used for prescriptions - private SimpleItemRecyclerViewAdapter mAdapter; + private RecyclerViewAdapter mAdapter; @Override public void onStart() { @@ -463,19 +464,19 @@ public class DrugListActivity extends AppCompatActivity { */ private void setupRecyclerView(@NonNull RecyclerView recyclerView) { recyclerView.addItemDecoration(new SimpleDividerItemDecoration(getApplicationContext())); - mAdapter = new SimpleItemRecyclerViewAdapter(prescriptionList); + mAdapter = new RecyclerViewAdapter(prescriptionList); recyclerView.setAdapter(mAdapter); } /** * SimpleItemRecyclerViewAdapter */ - public class SimpleItemRecyclerViewAdapter extends - RecyclerView.Adapter { + public class RecyclerViewAdapter extends + RecyclerView.Adapter { private final List mValues; - SimpleItemRecyclerViewAdapter(List items) { + RecyclerViewAdapter(List items) { mValues = items; }