Class NoteAdapter


  • public class NoteAdapter
    extends androidx.recyclerview.widget.RecyclerView.Adapter<NoteAdapter.ViewHolder>
    This class defines RecyclerView adapter that simply creates a view holder and binds the data to the view holder.
    Since:
    2022-02-21
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  NoteAdapter.ViewHolder
      Defines ViewHolder class that gives a reference to the views Code reference:
    • Constructor Summary

      Constructors 
      Constructor Description
      NoteAdapter​(java.util.List<Note> noteData, RecyclerViewInterface recyclerViewInterface)
      Adapter constructor to initialise the instance of NoteAdapter
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getItemCount()
      Gets size of the dataset
      void onBindViewHolder​(NoteAdapter.ViewHolder holder, int position)
      Sets the contents of a view
      NoteAdapter.ViewHolder onCreateViewHolder​(android.view.ViewGroup parent, int viewType)
      Creates new view
      • Methods inherited from class androidx.recyclerview.widget.RecyclerView.Adapter

        bindViewHolder, 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
      • Methods inherited from class java.lang.Object

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