app / me.argraur.notes.adapters / NotesAdapter

NotesAdapter

class NotesAdapter : Adapter<NotesHolder>

RecyclerView adapter for notes

Parameters

notes - Notes that should be added into view

activity - Activity where RecyclerView exists

Types

NotesHolder

RecyclerView holder for notes's cards

class NotesHolder : ViewHolder

Constructors

<init>

RecyclerView adapter for notes

NotesAdapter(notes: Array<Note>, activity: Activity)

Functions

getItemCount

fun getItemCount(): Int

onBindViewHolder

Adds data into cards based on given note's position

fun onBindViewHolder(holder: NotesHolder, position: Int): Unit

onCreateViewHolder

fun onCreateViewHolder(parent: ViewGroup, viewType: Int): NotesHolder