-
public abstract class BaseSingleItemAdapter<T extends Object, VH extends RecyclerView.ViewHolder> extends BaseQuickAdapter<T, VH>
Adapter for single item 只有单个 item 情况下的 Adapter
-
-
Field Summary
Fields Modifier and Type Field Description private Titemprivate final RecyclerViewrecyclerViewprivate final Contextcontextprivate final BooleanisEmptyViewHolderprivate BooleanisEmptyViewEnableprivate ViewemptyViewprivate BooleananimationEnableprivate BooleanisAnimationFirstOnlyprivate ItemAnimatoritemAnimationprivate List<T>items
-
Constructor Summary
Constructors Constructor Description BaseSingleItemAdapter(T mItem)Create empty Single item adapter
-
Method Summary
Modifier and Type Method Description final TgetItem()final UnitsetItem(T item)final RecyclerViewgetRecyclerView()final ContextgetContext()final BooleangetIsEmptyViewHolder(RecyclerView.ViewHolder $self)final BooleangetIsEmptyViewEnable()是否使用空布局 Whether to use empty layout. final UnitsetIsEmptyViewEnable(Boolean isEmptyViewEnable)final ViewgetEmptyView()Empty view. final UnitsetEmptyView(View emptyView)final BooleangetAnimationEnable()Whether enable animation. final UnitsetAnimationEnable(Boolean animationEnable)Whether enable animation. final BooleangetIsAnimationFirstOnly()Whether the animation executed only the first time. final UnitsetIsAnimationFirstOnly(Boolean isAnimationFirstOnly)Whether the animation executed only the first time. final ItemAnimatorgetItemAnimation()Set custom animation. final UnitsetItemAnimation(ItemAnimator itemAnimation)List<T>getItems()UnitsetItems(List<T> items)UnitonBindViewHolder(VH holder, T item, List<Object> payloads)final UnitsetItem(T t, Object payload)-
Methods inherited from class com.chad.library.adapter.base.BaseSingleItemAdapter
add, add, addAll, addAll, addOnItemChildClickListener, addOnItemChildLongClickListener, addOnViewAttachStateChangeListener, clearOnViewAttachStateChangeListener, displayEmptyView, getItem, getItemCount, getItemId, getItemPosition, getItemViewType, getOnItemClickListener, getOnItemLongClickListener, isFullSpanItem, onAttachedToRecyclerView, onBindViewHolder, onBindViewHolder, onCreateViewHolder, onDetachedFromRecyclerView, onViewAttachedToWindow, onViewDetachedFromWindow, remove, removeAt, removeOnItemChildClickListener, removeOnItemChildLongClickListener, removeOnViewAttachStateChangeListener, set, setEmptyViewLayout, setItemAnimation, setOnItemClickListener, setOnItemLongClickListener, submitList, swap -
Methods inherited from class com.chad.library.adapter.base.BaseQuickAdapter
bindViewHolder, canRestoreState, createViewHolder, findRelativeAdapterPositionIn, getStateRestorationPolicy, hasObservers, hasStableIds, notifyDataSetChanged, notifyItemChanged, notifyItemChanged, notifyItemInserted, notifyItemMoved, notifyItemRangeChanged, notifyItemRangeChanged, notifyItemRangeInserted, notifyItemRangeRemoved, notifyItemRemoved, onFailedToRecycleView, onViewRecycled, registerAdapterDataObserver, setHasStableIds, setStateRestorationPolicy, unregisterAdapterDataObserver -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BaseSingleItemAdapter
BaseSingleItemAdapter(T mItem)
Create empty Single item adapter
-
-
Method Detail
-
getRecyclerView
final RecyclerView getRecyclerView()
-
getContext
final Context getContext()
-
getIsEmptyViewHolder
final Boolean getIsEmptyViewHolder(RecyclerView.ViewHolder $self)
-
getIsEmptyViewEnable
final Boolean getIsEmptyViewEnable()
是否使用空布局 Whether to use empty layout.
-
setIsEmptyViewEnable
final Unit setIsEmptyViewEnable(Boolean isEmptyViewEnable)
-
getEmptyView
final View getEmptyView()
-
setEmptyView
final Unit setEmptyView(View emptyView)
-
getAnimationEnable
final Boolean getAnimationEnable()
Whether enable animation. 是否打开动画
-
setAnimationEnable
final Unit setAnimationEnable(Boolean animationEnable)
Whether enable animation. 是否打开动画
-
getIsAnimationFirstOnly
final Boolean getIsAnimationFirstOnly()
Whether the animation executed only the first time. 动画是否仅第一次执行
-
setIsAnimationFirstOnly
final Unit setIsAnimationFirstOnly(Boolean isAnimationFirstOnly)
Whether the animation executed only the first time. 动画是否仅第一次执行
-
getItemAnimation
final ItemAnimator getItemAnimation()
Set custom animation. 设置自定义动画
-
setItemAnimation
final Unit setItemAnimation(ItemAnimator itemAnimation)
-
-
-
-