package adapter

import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.yidianling.article.R

class ArticleHomeAdapter:RecyclerView.Adapter<ArticleHomeAdapter.ArticleViewHolder>() {

    val list = listOf("One","Two","Three","Four","Five","Six")

    override fun onCreateViewHolder(parent: ViewGroup, position: Int): ArticleViewHolder {
        val view = LayoutInflater.from(parent.context).inflate(R.layout.article_fragment_layout,parent,false)
        return ArticleViewHolder(view)
    }

    override fun onBindViewHolder(holder: ArticleViewHolder, position: Int) {

    }

    override fun getItemCount(): Int {
        return list.size
    }

    inner class ArticleViewHolder(val view: View):RecyclerView.ViewHolder(view)


}