title: kotlin RecyclerView Pagination
body: <p>I need to make my <code>RecyclerView</code> load only 10 items and load more 10 after scrolling and work like this.<br>
  I was add the items in array using <code>Volley</code>.<br>
  Here is my <code>RecyclerView</code> adapter.</p>
  
  <pre><code>class newsAdapter constructor(private val activety:MainActivity, private val ListOfCash:ArrayList&lt;newsModling&gt;,
                            val listener:BTNListener): RecyclerView.Adapter&lt;newsAdapter.ViewHolder&gt;(),BTNListener {
  
      override fun getItemCount(): Int = ListOfCash.size
  
      override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
          return ViewHolder(LayoutInflater.from(parent.context).inflate(R.layout.news_tick, parent, false))
      }
  
      override fun onBindViewHolder(holder: ViewHolder, position: Int) {
          holder.bind(ListOfCash[position], listener, ListOfCash)
      }
  
      inner class ViewHolder(itemView: View?) : RecyclerView.ViewHolder(itemView) {
          fun bind(Data: newsModling, listener: BTNListener, listOfnew: ArrayList&lt;newsModling&gt;) {
              var ListOfnewsin = listOfnew[adapterPosition]
  
              var newstitle = ListOfnewsin.title
              var newsdate = ListOfnewsin.date
  
              itemView.newsDate.text = newsdate
              itemView.newsTitle.text = newstitle
  
              itemView.setOnClickListener{
                  //var cashSTR = cashNumIn.toString()
              }
          }
      }
  }
  </code></pre>
  
  <p>I don't know, what I must use or where I will type it.</p>