package com.adealink.frame.imkit.widget.adapter

import android.annotation.SuppressLint
import android.view.ViewGroup
import android.widget.TextView

class DefaultProvider<T> : IViewProvider<T> {
    @SuppressLint("SetTextI18n")
    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
        val textView = TextView(parent.context)
        textView.text = "The current version does not support viewing this message"
        return ViewHolder(parent.context, textView)
    }

    override fun isItemViewType(item: T): Boolean {
        return true
    }

    override fun bindViewHolder(
        holder: ViewHolder,
        t: T,
        position: Int,
        list: List<T>,
        listener: IViewProviderListener<T>?
    ) {
        // do nothing
    }
}
