Package 

Class BindingGridViewAdapter

    • Constructor Detail

      • BindingGridViewAdapter

        BindingGridViewAdapter()
    • Method Detail

      • onCreateViewHolder

         BindingViewHolder onCreateViewHolder(ViewGroup parent, Integer viewType)

        Called when RecyclerView needs a new RecyclerView.ViewHolder of the given type to represent an item.

        Parameters:
        parent - The ViewGroup into which the new View will be added after it is bound to an adapter position.
        viewType - The view type of the new View.
      • onBindViewHolder

         Unit onBindViewHolder(BindingViewHolder holder, Integer position, Integer pagePosition, T item)

        Called by RecyclerView to display the data at the specified position. This method should update the contents of the RecyclerView.ViewHolder.itemView to reflect the item at the given position.

        Parameters:
        holder - The ViewHolder which should be updated to represent the contents of the item at the given position in the data set.
        position - The position of the item within the adapter's data set.
        pagePosition - The position of the item within the page`s data set.
        item - The data of current position.
      • setVariable

         abstract Unit setVariable(ViewDataBinding binding, T item, Integer position)

        Set variable data

        example: binding.setVariable(BR.viewModel, viewModel);