-
public abstract class BaseNodeAdapter extends BaseQuickAdapter<Any, RecyclerView.ViewHolder>
-
-
Field Summary
Fields Modifier and Type Field Description private List<Object>itemsprivate final RecyclerViewrecyclerViewprivate final Contextcontextprivate final BooleanisEmptyViewHolderprivate BooleanisEmptyViewEnableprivate BooleanisStateViewEnableprivate ViewstateViewprivate BooleanisUseStateViewSizeprivate ViewemptyViewprivate BooleananimationEnableprivate BooleanisAnimationFirstOnlyprivate ItemAnimatoritemAnimation
-
Constructor Summary
Constructors Constructor Description BaseNodeAdapter()
-
Method Summary
Modifier and Type Method Description final List<Object>getItems()final UnitsetItems(List<Object> items)final RecyclerViewgetRecyclerView()final ContextgetContext()final BooleangetIsEmptyViewHolder(RecyclerView.ViewHolder $self)final BooleangetIsEmptyViewEnable()final UnitsetIsEmptyViewEnable(@Deprecated(message = 使用 isStateViewEnable, replaceWith = @ReplaceWith(imports = {}, expression = isStateViewEnable)) Boolean isEmptyViewEnable)final BooleangetIsStateViewEnable()Whether to use state layout. final UnitsetIsStateViewEnable(Boolean isStateViewEnable)final ViewgetStateView()State view. final UnitsetStateView(View stateView)final BooleangetIsUseStateViewSize()是否使用状态布局的尺寸。Whether to use the dimensions of the state layout. final UnitsetIsUseStateViewSize(Boolean isUseStateViewSize)是否使用状态布局的尺寸。Whether to use the dimensions of the state layout. final ViewgetEmptyView()final UnitsetEmptyView(@Deprecated(message = 使用 stateView, replaceWith = @ReplaceWith(imports = {}, expression = stateView)) 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)abstract List<Object>getChildNodeList(Integer position, Object parent)获取子节点列表。Get child node list. abstract BooleanisInitialOpen(Integer position, Object parent)设置数据时,默认需要打开的节点。When submitList, the nodes that need to be opened by default. UnitsubmitList(List<Object> list, Runnable commitCallback)setting up a new instance to data;设置新的数据集合 final Booleanopen(Integer position, Object positionPayload)打开节点。Open node. final Booleanopen(Integer position)打开节点。Open node. final Booleanclose(Integer position, Object positionPayload)关闭节点。Close node. final Booleanclose(Integer position)关闭节点。Close node. final UnitcloseAll()关闭全部的节点Close all. final BooleanopenOrClose(Integer position)打开或关闭节点。Open or close. final BooleanisOpened(Object item)是否打开。Is opened final BooleanisOpenedAt(Integer position)-
Methods inherited from class com.chad.library.adapter4.BaseNodeAdapter
add, add, add, add, addAll, addAll, addAll, addAll, addOnItemChildClickListener, addOnItemChildLongClickListener, addOnViewAttachStateChangeListener, clearOnViewAttachStateChangeListener, displayEmptyView, getItem, getItemCount, getItemId, getItemOrNull, getItemViewType, getOnItemClickListener, getOnItemLongClickListener, isFullSpanItem, itemIndexOfFirst, move, move, onAttachedToRecyclerView, onBindViewHolder, onBindViewHolder, onCreateViewHolder, onCurrentListChanged, onDetachedFromRecyclerView, onViewAttachedToWindow, onViewDetachedFromWindow, remove, remove, removeAt, removeAt, removeAtRange, removeAtRange, removeOnItemChildClickListener, removeOnItemChildLongClickListener, removeOnViewAttachStateChangeListener, set, set, setEmptyViewLayout, setItemAnimation, setOnItemClickListener, setOnItemLongClickListener, setStateViewLayout, swap, swap -
Methods inherited from class com.chad.library.adapter4.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
-
-
Method Detail
-
getRecyclerView
final RecyclerView getRecyclerView()
-
getContext
final Context getContext()
-
getIsEmptyViewHolder
final Boolean getIsEmptyViewHolder(RecyclerView.ViewHolder $self)
-
getIsEmptyViewEnable
final Boolean getIsEmptyViewEnable()
-
setIsEmptyViewEnable
final Unit setIsEmptyViewEnable(@Deprecated(message = 使用 isStateViewEnable, replaceWith = @ReplaceWith(imports = {}, expression = isStateViewEnable)) Boolean isEmptyViewEnable)
-
getIsStateViewEnable
final Boolean getIsStateViewEnable()
Whether to use state layout. 是否使用状态布局。
-
setIsStateViewEnable
final Unit setIsStateViewEnable(Boolean isStateViewEnable)
-
getStateView
final View getStateView()
-
setStateView
final Unit setStateView(View stateView)
-
getIsUseStateViewSize
final Boolean getIsUseStateViewSize()
是否使用状态布局的尺寸。
Whether to use the dimensions of the state layout.
-
setIsUseStateViewSize
final Unit setIsUseStateViewSize(Boolean isUseStateViewSize)
是否使用状态布局的尺寸。
Whether to use the dimensions of the state layout.
-
getEmptyView
final View getEmptyView()
-
setEmptyView
final Unit setEmptyView(@Deprecated(message = 使用 stateView, replaceWith = @ReplaceWith(imports = {}, expression = stateView)) 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)
-
getChildNodeList
abstract List<Object> getChildNodeList(Integer position, Object parent)
获取子节点列表。
Get child node list.
-
isInitialOpen
abstract Boolean isInitialOpen(Integer position, Object parent)
设置数据时,默认需要打开的节点。
When submitList, the nodes that need to be opened by default.
-
submitList
Unit submitList(List<Object> list, Runnable commitCallback)
setting up a new instance to data;
设置新的数据集合
- Parameters:
list- 新数据集
-
open
@JvmOverloads() final Boolean open(Integer position, Object positionPayload)
打开节点。
Open node.
-
open
@JvmOverloads() final Boolean open(Integer position)
打开节点。
Open node.
-
close
@JvmOverloads() final Boolean close(Integer position, Object positionPayload)
关闭节点。
Close node.
-
close
@JvmOverloads() final Boolean close(Integer position)
关闭节点。
Close node.
-
openOrClose
final Boolean openOrClose(Integer position)
打开或关闭节点。
Open or close.
- Parameters:
position- The data location of the adapter.
-
isOpenedAt
final Boolean isOpenedAt(Integer position)
-
-
-
-