Class HostsAdapter

    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.cheetahdigital.uikit.widget.list.ListAdapter

        com.cheetahdigital.uikit.widget.list.ListAdapter.EmptyViewHolder
    • Field Summary

      • Fields inherited from class com.cheetahdigital.uikit.widget.list.ListAdapter

        VIEW_TYPE_HEADER, VIEW_TYPE_NORMAL
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void bindNormalViewHolder​(HostViewHolder holder, int position)
      Abstract method to bind the normal view holder.
      protected HostViewHolder createNormalViewHolder​(android.view.ViewGroup parent, int viewType)
      Abstract method to create normal view holder.
      • Methods inherited from class com.cheetahdigital.uikit.widget.list.ListAdapter

        addAll, addItem, addItem, clear, getDataList, getItemAt, getItemCount, getItemViewType, getPlaceHolderResource, insertItems, isListEmpty, onBindViewHolder, onCreateViewHolder, removeItem, replaceItemAt, setCustomEmptyMessageResource, setPlaceHolderResource, sort
      • Methods inherited from class androidx.recyclerview.widget.RecyclerView.Adapter

        bindViewHolder, createViewHolder, getItemId, 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
    • Constructor Detail

      • HostsAdapter

        public HostsAdapter​(java.util.List<Host> dataList)
        Constructor of HostsAdapter
        Parameters:
        dataList - list of Host to bind with the adapter
    • Method Detail

      • createNormalViewHolder

        protected HostViewHolder createNormalViewHolder​(android.view.ViewGroup parent,
                                                        int viewType)
        Description copied from class: com.cheetahdigital.uikit.widget.list.ListAdapter
        Abstract method to create normal view holder.
        Specified by:
        createNormalViewHolder in class com.cheetahdigital.uikit.widget.list.ListAdapter<Host,​HostViewHolder>
        Parameters:
        parent - used to get resource
        viewType - type of view
        Returns:
        view holder for non special items
      • bindNormalViewHolder

        protected void bindNormalViewHolder​(HostViewHolder holder,
                                            int position)
        Description copied from class: com.cheetahdigital.uikit.widget.list.ListAdapter
        Abstract method to bind the normal view holder.
        Specified by:
        bindNormalViewHolder in class com.cheetahdigital.uikit.widget.list.ListAdapter<Host,​HostViewHolder>
        Parameters:
        holder - view holder to vindS
        position - index of the item