Credential Adapter
class CredentialAdapter(onDeleteClicked: (String) -> Unit, lifecycleOwner: LifecycleOwner, armadilloViewModel: ArmadilloViewModel) : ListAdapter<Credential, CredentialAdapter.CredentialViewHolder>
Content copied to clipboard
RecyclerView adapter used to display the retrieved list of credentials.
The adapter manages the RecyclerView CredentialViewHolders and binds the values from the retrieved list to the holders. If a holder is currently (re)usable, the current value is bound to it. If no holder is (re)usable, a new one is created and the current value 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
CredentialAdapter
Link copied to clipboard
fun CredentialAdapter(onDeleteClicked: (String) -> Unit, lifecycleOwner: LifecycleOwner, armadilloViewModel: ArmadilloViewModel)
Content copied to clipboard
Types
CredentialViewHolder
Link copied to clipboard
class CredentialViewHolder(binding: <ERROR CLASS>, onDeleteClicked: (String) -> Unit) : RecyclerView.ViewHolder
Content copied to clipboard
ViewHolder class used by CredentialAdapter.
DiffCallback
Link copied to clipboard
Allows RecyclerView to determine whether Credential items have changed in an update of the Credential list.
Properties
armadilloViewModel
Link copied to clipboard
lifecycleOwner
Link copied to clipboard
Is necessary to set an observer to dyslexicFont value in armadilloViewModel.
onDeleteClicked
Link copied to clipboard
Inherited properties
mDiffer
Link copied to clipboard
mHasStableIds
Link copied to clipboard
mListener
Link copied to clipboard
mObservable
Link copied to clipboard
Functions
onBindViewHolder
Link copied to clipboard
open override fun onBindViewHolder(holder: CredentialAdapter.CredentialViewHolder, position: Int)
Content copied to clipboard
If there is a (re)usable CredentialViewHolder: change its content.
onCreateViewHolder
Link copied to clipboard
open override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CredentialAdapter.CredentialViewHolder
Content copied to clipboard
If there is no (re)usable CredentialViewHolder: create a new one.
Inherited functions
bindViewHolder
Link copied to clipboard
fun bindViewHolder(@NonNull() p0: CredentialAdapter.CredentialViewHolder, p1: Int)
Content copied to clipboard
createViewHolder
Link copied to clipboard
@NonNull()
Content copied to clipboard
getCurrentList
Link copied to clipboard
getItem
Link copied to clipboard
getItemCount
Link 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: CredentialAdapter.CredentialViewHolder, p1: Int, @NonNull() p2: MutableList<Any>)
Content copied to clipboard
onCurrentListChanged
Link copied to clipboard
open fun onCurrentListChanged(@NonNull() p0: MutableList<Credential>, @NonNull() p1: MutableList<Credential>)
Content copied to clipboard
onDetachedFromRecyclerView
Link copied to clipboard
onFailedToRecycleView
Link copied to clipboard
open fun onFailedToRecycleView(@NonNull() p0: CredentialAdapter.CredentialViewHolder): Boolean
Content copied to clipboard
onViewAttachedToWindow
Link copied to clipboard
open fun onViewAttachedToWindow(@NonNull() p0: CredentialAdapter.CredentialViewHolder)
Content copied to clipboard
onViewDetachedFromWindow
Link copied to clipboard
open fun onViewDetachedFromWindow(@NonNull() p0: CredentialAdapter.CredentialViewHolder)
Content copied to clipboard
onViewRecycled
Link copied to clipboard
open fun onViewRecycled(@NonNull() p0: CredentialAdapter.CredentialViewHolder)
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
submitList
Link copied to clipboard
open fun submitList(@Nullable() p0: MutableList<Credential>?, @Nullable() p1: Runnable?)
Content copied to clipboard
unregisterAdapterDataObserver
Link copied to clipboard
open fun unregisterAdapterDataObserver(@NonNull() p0: RecyclerView.AdapterDataObserver)
Content copied to clipboard