Package com.example.iconic_raffleevent
Class QRCodeGalleryAdapter
java.lang.Object
androidx.recyclerview.widget.RecyclerView.Adapter<QRCodeGalleryAdapter.QRCodeViewHolder>
com.example.iconic_raffleevent.QRCodeGalleryAdapter
public class QRCodeGalleryAdapter
extends androidx.recyclerview.widget.RecyclerView.Adapter<QRCodeGalleryAdapter.QRCodeViewHolder>
Adapter for displaying QR codes in a RecyclerView.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceInterface for handling QR code item clicks.static classViewHolder for QR code items.
- 
Constructor SummaryConstructorsConstructorDescriptionQRCodeGalleryAdapter(android.content.Context context, List<QRCodeData> qrCodeList, QRCodeGalleryAdapter.QRCodeClickListener qrCodeClickListener) Constructor for QRCodeGalleryAdapter.
- 
Method SummaryModifier and TypeMethodDescriptionintvoidonBindViewHolder(QRCodeGalleryAdapter.QRCodeViewHolder holder, int position) onCreateViewHolder(android.view.ViewGroup parent, int viewType) voidupdateQRCodeList(List<QRCodeData> newQRCodeList) Update the QR code list dynamically.Methods inherited from class androidx.recyclerview.widget.RecyclerView.AdapterbindViewHolder, createViewHolder, getItemId, getItemViewType, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserver
- 
Constructor Details- 
QRCodeGalleryAdapterpublic QRCodeGalleryAdapter(android.content.Context context, List<QRCodeData> qrCodeList, QRCodeGalleryAdapter.QRCodeClickListener qrCodeClickListener) Constructor for QRCodeGalleryAdapter.- Parameters:
- context- The application context.
- qrCodeList- List of QRCodeData objects to display.
- qrCodeClickListener- Listener for QR code item clicks.
 
 
- 
- 
Method Details- 
onCreateViewHolder@NonNull public QRCodeGalleryAdapter.QRCodeViewHolder onCreateViewHolder(@NonNull android.view.ViewGroup parent, int viewType) - Specified by:
- onCreateViewHolderin class- androidx.recyclerview.widget.RecyclerView.Adapter<QRCodeGalleryAdapter.QRCodeViewHolder>
 
- 
onBindViewHolder- Specified by:
- onBindViewHolderin class- androidx.recyclerview.widget.RecyclerView.Adapter<QRCodeGalleryAdapter.QRCodeViewHolder>
 
- 
getItemCountpublic int getItemCount()- Specified by:
- getItemCountin class- androidx.recyclerview.widget.RecyclerView.Adapter<QRCodeGalleryAdapter.QRCodeViewHolder>
 
- 
updateQRCodeListUpdate the QR code list dynamically.- Parameters:
- newQRCodeList- New list of QR codes.
 
 
-