Help Item Adapter
class HelpItemAdapter(context: Context, data: List<HelpData>, armadilloViewModel: ArmadilloViewModel, lifecycleOwner: LifecycleOwner) : RecyclerView.Adapter<HelpItemAdapter.HelpItemViewHolder>
Content copied to clipboard
RecyclerView adapter used to display the list of help resources for the current Fragment.
The adapter manages the RecyclerView HelpItemViewHolders and binds the values from the help resource list to the holders. If a holder is currently (re)usable, the current help resource is bound to it. If no holder is (re)usable, a new one is created and the current help resource is then bound to it. As soon as the user scrolls further and a Holder leaves the screen, it is no longer needed to display its current content and can be reused by binding a new content to it.
Constructors
HelpItemAdapter
Link copied to clipboard
fun HelpItemAdapter(context: Context, data: List<HelpData>, armadilloViewModel: ArmadilloViewModel, lifecycleOwner: LifecycleOwner)
Content copied to clipboard
Types
HelpItemViewHolder
Link copied to clipboard
Properties
armadilloViewModel
Link copied to clipboard
data
Link copied to clipboard
retrieved list of help resources from HelpViewModel which was parsed from /assets/helpdata.
lifecycleOwner
Link copied to clipboard
Is necessary to set an observer to dyslexicFont value in armadilloViewModel.
Inherited properties
Functions
getItemCount
Link copied to clipboard
onBindViewHolder
Link copied to clipboard
open override fun onBindViewHolder(holder: HelpItemAdapter.HelpItemViewHolder, position: Int)
Content copied to clipboard
If there is a (re)usable HelpItemViewHolder: change its content.
onCreateViewHolder
Link copied to clipboard
open override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): HelpItemAdapter.HelpItemViewHolder
Content copied to clipboard
If there is no (re)usable HelpItemViewHolder: create a new one.
Inherited functions
bindViewHolder
Link copied to clipboard
fun bindViewHolder(@NonNull() p0: HelpItemAdapter.HelpItemViewHolder, p1: Int)
Content copied to clipboard
createViewHolder
Link copied to clipboard
@NonNull()
Content copied to clipboard
getItemViewType
Link copied to clipboard
hasObservers
Link copied to clipboard
hasStableIds
Link copied to clipboard
notifyDataSetChanged
Link copied to clipboard
fun notifyDataSetChanged()
Content copied to clipboard
notifyItemChanged
Link copied to clipboard
notifyItemInserted
Link copied to clipboard
notifyItemMoved
Link copied to clipboard
notifyItemRangeChanged
Link copied to clipboard
notifyItemRangeInserted
Link copied to clipboard
notifyItemRangeRemoved
Link copied to clipboard
notifyItemRemoved
Link copied to clipboard
onAttachedToRecyclerView
Link copied to clipboard
onBindViewHolder
Link copied to clipboard
open fun onBindViewHolder(@NonNull() p0: HelpItemAdapter.HelpItemViewHolder, p1: Int, @NonNull() p2: MutableList<Any>)
Content copied to clipboard
onDetachedFromRecyclerView
Link copied to clipboard
onFailedToRecycleView
Link copied to clipboard
open fun onFailedToRecycleView(@NonNull() p0: HelpItemAdapter.HelpItemViewHolder): Boolean
Content copied to clipboard
onViewAttachedToWindow
Link copied to clipboard
open fun onViewAttachedToWindow(@NonNull() p0: HelpItemAdapter.HelpItemViewHolder)
Content copied to clipboard
onViewDetachedFromWindow
Link copied to clipboard
open fun onViewDetachedFromWindow(@NonNull() p0: HelpItemAdapter.HelpItemViewHolder)
Content copied to clipboard
onViewRecycled
Link copied to clipboard
open fun onViewRecycled(@NonNull() p0: HelpItemAdapter.HelpItemViewHolder)
Content copied to clipboard
registerAdapterDataObserver
Link copied to clipboard
open fun registerAdapterDataObserver(@NonNull() p0: RecyclerView.AdapterDataObserver)
Content copied to clipboard
setHasStableIds
Link copied to clipboard
unregisterAdapterDataObserver
Link copied to clipboard
open fun unregisterAdapterDataObserver(@NonNull() p0: RecyclerView.AdapterDataObserver)
Content copied to clipboard