Created
June 20, 2022 14:36
-
-
Save wajahatkarim3/38bcd9c60d494163f5d878e07e0d0c5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HeaderAdapter() : | |
RecyclerView.Adapter<HeaderAdapter.ViewHolder>() { | |
inner class ViewHolder(val binding: HeaderLayoutBinding) : | |
RecyclerView.ViewHolder(binding.root) { } | |
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { | |
return ViewHolder( | |
HeaderLayoutBinding.inflate( | |
LayoutInflater.from(parent.context), | |
parent, | |
false | |
) | |
) | |
} | |
override fun onBindViewHolder(holder: ViewHolder, position: Int) { | |
holder.binding.apply { | |
} | |
} | |
override fun getItemCount(): Int { | |
return 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment