public class DataSourceListAdapter extends android.support.v7.widget.RecyclerView.Adapter<DataSourceListAdapter.MultiViewHolder>
Modifier and Type | Class and Description |
---|---|
static class |
DataSourceListAdapter.DataSourceViewHolder<DATA> |
protected static class |
DataSourceListAdapter.MultiView |
protected class |
DataSourceListAdapter.MultiViewHolder |
static interface |
DataSourceListAdapter.OnItemClickListener<T extends DataSourceInterface> |
Constructor and Description |
---|
DataSourceListAdapter(Context context) |
bindViewHolder, createViewHolder, getItemId, getItemViewType, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onDetachedFromRecyclerView, onFailedToRecycleView, onViewDetachedFromWindow, onViewRecycled, registerAdapterDataObserver, setHasStableIds, unregisterAdapterDataObserver
public void addEntity(int i, DataSourceInterface entity)
public boolean contains(DataSourceInterface entity)
public void deleteEntity(int i)
public void dispatchOnItemClick(DataSourceInterface entity)
@Nullable public DataSourceInterface getEntityAt(int i)
public int getItemCount()
getItemCount
in class android.support.v7.widget.RecyclerView.Adapter<DataSourceListAdapter.MultiViewHolder>
public int getPosition(DataSourceInterface item)
public void invalidateItem(DataSourceInterface item)
public void moveEntity(DataSourceInterface entity, int loc)
public void onAttachedToRecyclerView(android.support.v7.widget.RecyclerView recyclerView)
onAttachedToRecyclerView
in class android.support.v7.widget.RecyclerView.Adapter<DataSourceListAdapter.MultiViewHolder>
public void onBindViewHolder(@NonNull DataSourceListAdapter.MultiViewHolder holder, int position)
onBindViewHolder
in class android.support.v7.widget.RecyclerView.Adapter<DataSourceListAdapter.MultiViewHolder>
public void onBindViewHolder(@NonNull DataSourceListAdapter.MultiViewHolder holder, int position, @Nullable java.util.List<java.lang.Object> payloads)
onBindViewHolder
in class android.support.v7.widget.RecyclerView.Adapter<DataSourceListAdapter.MultiViewHolder>
@NonNull public DataSourceListAdapter.MultiViewHolder onCreateViewHolder(ViewGroup viewGroup, int i)
onCreateViewHolder
in class android.support.v7.widget.RecyclerView.Adapter<DataSourceListAdapter.MultiViewHolder>
public void onViewAttachedToWindow(DataSourceListAdapter.MultiViewHolder holder)
onViewAttachedToWindow
in class android.support.v7.widget.RecyclerView.Adapter<DataSourceListAdapter.MultiViewHolder>
public void setData(@NonNull java.util.List<? extends DataSourceInterface> data)
public void setOnItemClickListener(DataSourceListAdapter.OnItemClickListener listener)
public void setSelection(DataSourceInterface item)
public void setUseVerticalLayout(boolean useVerticalLayout)