java.lang.Object
com.pranavpandey.android.dynamic.support.recyclerview.binder.DynamicRecyclerViewBinder<VH>
com.pranavpandey.android.dynamic.support.recyclerview.binder.DynamicDataBinder<T,VH>
Type Parameters:
T - The type of the data this binder will receive.
VH - The type of the dynamic recycler view binder.
Direct Known Subclasses:
DynamicQueryBinder, InfoBigBinder, ItemBinder

public abstract class DynamicDataBinder<T,VH extends RecyclerView.ViewHolder> extends DynamicRecyclerViewBinder<VH>
A DynamicRecyclerViewBinder to bind the generic data that can be used with the DynamicBinderAdapter.
  • Constructor Details

    • DynamicDataBinder

      public DynamicDataBinder(@NonNull DynamicBinderAdapter<?> binderAdapter)
      Constructor to initialize an object of this class.
      Parameters:
      binderAdapter - The dynamic binder adapter for the recycler view.
  • Method Details

    • getItemCount

      public int getItemCount()
      Description copied from class: DynamicRecyclerViewBinder
      Returns the total no. of items in this data binder.
      Specified by:
      getItemCount in class DynamicRecyclerViewBinder<VH extends RecyclerView.ViewHolder>
      Returns:
      The total no. of items in this data binder.
    • getData

      @Nullable public T getData()
      Get the data used by this binder.
      Returns:
      The data used by this binder.
    • setData

      public void setData(@Nullable T data)
      Set the data for this binder.
      Parameters:
      data - The data to be set.
    • setData

      public void setData(@Nullable T data, int position)
      Set the data for this binder.
      Parameters:
      data - The data to be set.
      position - The binder position to be notified.