UsersAdapter

Author

Alper Sahin An adapter class for populating a RecyclerView with a list of User objects.

Parameters

users

The list of users to display in the RecyclerView.

userListener

The listener to handle user item click events.

Constructors

Link copied to clipboard
constructor(users: List<User>, userListener: UserListener)

creates an parameter

Types

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun filterList(filteredList: ArrayList<User>)

Updates the adapter's data with a filtered list of users and notifies the RecyclerView of the change.

Link copied to clipboard
open override fun getItemCount(): Int

Returns the number of items in the adapter's data set.

Link copied to clipboard
open fun getItemId(p0: Int): Long
Link copied to clipboard
open fun getItemViewType(p0: Int): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun notifyItemMoved(p0: Int, p1: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

open override fun onBindViewHolder(holder: UsersAdapter.UserViewHolder, position: Int)

Binds data to a UserViewHolder at the specified position.

Link copied to clipboard
open override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): UsersAdapter.UserViewHolder

Creates and returns a new UserViewHolder instance for the RecyclerView.

Link copied to clipboard
Link copied to clipboard
open fun setHasStableIds(p0: Boolean)