diff --git a/app/src/main/java/com/a1/nextlocation/fragments/CouponFragment.java b/app/src/main/java/com/a1/nextlocation/fragments/CouponFragment.java index 675709e..aa1d09e 100644 --- a/app/src/main/java/com/a1/nextlocation/fragments/CouponFragment.java +++ b/app/src/main/java/com/a1/nextlocation/fragments/CouponFragment.java @@ -42,10 +42,14 @@ public class CouponFragment extends Fragment { CouponListManager.INSTANCE.load(); this.couponList = CouponListManager.INSTANCE.getCouponList(); - this.couponAdapter = new CouponAdapter(this.getContext(), this.couponList); + this.couponAdapter = new CouponAdapter(this.getContext(), this.couponList, onClickedItem -> showPopup()); this.couponRecyclerView.setLayoutManager(this.layoutManager); this.couponRecyclerView.setAdapter(this.couponAdapter); return view; } + + private void showPopup() { + + } } \ No newline at end of file diff --git a/app/src/main/java/com/a1/nextlocation/recyclerview/CouponAdapter.java b/app/src/main/java/com/a1/nextlocation/recyclerview/CouponAdapter.java index c53cce9..d312f25 100644 --- a/app/src/main/java/com/a1/nextlocation/recyclerview/CouponAdapter.java +++ b/app/src/main/java/com/a1/nextlocation/recyclerview/CouponAdapter.java @@ -1,6 +1,7 @@ package com.a1.nextlocation.recyclerview; import android.content.Context; +import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.view.LayoutInflater; @@ -24,10 +25,11 @@ public class CouponAdapter extends RecyclerView.Adapter coupon){ - appContext = context; - couponList = coupon; + public CouponAdapter(Context context, List coupon, OnItemClickListener listener){ + this.appContext = context; + this.couponList = coupon; + this.clickListener = listener; + } @NonNull @@ -59,6 +72,7 @@ public class CouponAdapter extends RecyclerView.Adapter