title: How to do latest jetpack "View binding" in adapter, bind the views?
body: <p>How to do latest jetpack "View binding" in adapter, for automatically binding the views. I am not using the findVeiwById or Butterknife or Kotlin synthetic??? I have used the new view binding and is is working fine for Activity and for Fragment. I am able to see the ActivityHomeBinding and FragmentHomeBinding files after enabling the viewBinding in build.gradle file. Also, I am seeing the class ItemListBinding for the item xml used i.e. item_list.xml. But how to use this file in the adapter of the recyclerview</p>
  
  <pre><code>viewBinding {
          enabled = true
  }
  </code></pre>
  
  <p>Home Activity file</p>
  
  <pre><code>override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          binding = ActivityHomeBinding.inflate(layoutInflater)
          setContentView(binding.root)
  }
  </code></pre>
  
  <p>Fragment</p>
  
  <pre><code>override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
          binding = FragmentHomeBinding.inflate(inflater, container, false)
          val view = binding.root
          return view
  }
  </code></pre>
  
  <p>Base Adapter: <strong>Want to use view binding here. I am able to see ItemListBinding, but not getting how to use it.</strong></p>
  
  <pre><code>class BaseAdapter @Inject constructor(
      private val context: Context,
      private val picasso: Picasso
  ) :
      RecyclerView.Adapter&lt;BaseAdapter.ViewHolder&gt;() {
  
      private var data = ArrayList&lt;Data&gt;()
  
      override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
          return ViewHolder(
              LayoutInflater.from(context).inflate(R.layout.item_list, parent, false)
          )
      }
  
      override fun getItemCount() = data.size
  
      override fun onBindViewHolder(holder: ViewHolder, position: Int) {
          with(holder) {
                // TODO
          }
      }
  
      class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
  
          @BindView(R.id.tvMovieName)
          lateinit var nameTV: TextView
  
          @BindView(R.id.imageView)
          lateinit var bannerImage: ImageView
  
          init {
              ButterKnife.bind(this@ViewHolder, view)
          }
      }
  
      fun setData(serverData: ArrayList&lt;Data&gt;) {
          data = serverData
          notifyDataSetChanged()
      }
  }
  </code></pre>