Class NotificationAdapter

java.lang.Object
androidx.recyclerview.widget.RecyclerView.Adapter<NotificationAdapter.NotificationViewHolder>
com.example.lottery.adapter.NotificationAdapter

public class NotificationAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<NotificationAdapter.NotificationViewHolder>
Adapter used to display notifications in a RecyclerView.

This adapter binds NotificationItem objects from the user's inbox.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    ViewHolder that caches references to the notification item's UI components.
    static interface 
    Callback interface invoked when a notification item is clicked.

    Nested classes/interfaces inherited from class androidx.recyclerview.widget.RecyclerView.Adapter

    androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new NotificationAdapter.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    void
     
    onCreateViewHolder(android.view.ViewGroup parent, int viewType)
    Creates a new ViewHolder for notification items.
    void
    setEventSpecificMode(boolean eventSpecificMode)
    Sets whether the adapter is operating in event-specific mode.

    Methods inherited from class androidx.recyclerview.widget.RecyclerView.Adapter

    bindViewHolder, createViewHolder, findRelativeAdapterPositionIn, getItemId, getItemViewType, getStateRestorationPolicy, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onAttachedToRecyclerView, onBindViewHolder, onDetachedFromRecyclerView, onFailedToRecycleView, onViewAttachedToWindow, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, setStateRestorationPolicy, unregisterAdapterDataObserver

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait