Hi, can someone guide how to manage viewbinding in...
# android
a
Hi, can someone guide how to manage viewbinding in adapter incase we have two viewTypes of layouts
Copy code
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
    mContext = parent.context

    val binding = if (viewType == 0)
        VerOcfProductGroupLayoutBinding.inflate(
            LayoutInflater.from(parent.context),
            parent,
            false
        )
    else
        OcfProductGroupLayoutBinding.inflate(
            LayoutInflater.from(parent.context),
            parent,
            false
        )

    return ViewHolder(binding)

}
How to handling in
onBindViewHolder
?
😶 3
a
Thanks @Priya this helps me a lot.
👍 1