title: OnScrollListener not working when used via databinding
body: <p>I am trying to use onScrollListener to hide BottomNavigationView and other UI elements of mainActivity. while my recyclerview is located in the fragment inside the mainActivity and I am using custom binding adapter to inflate the recyclerview. I am currently using databinding.</p>
  <p>My code</p>
  <pre><code>class HomeFragment : Fragment() {
  
      override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
                                savedInstanceState: Bundle?): View? {
          // Inflate the layout for this fragment
          val binding= FragmentHomeBinding.inflate(inflater,container,false)
          hideFloatingActionButton()
  
          binding.dataList = DataProvider.productList
  
          return binding.root
  
      }
  
      private fun hideFloatingActionButton(){
  
          rv_products?.addOnScrollListener(object : RecyclerView.OnScrollListener() {
              override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
                  super.onScrolled(recyclerView, dx, dy)
                  if (dy &gt; 0) {
                      // Scrolling up
                      Toast.makeText(activity,&quot;Going upp&quot;, Toast.LENGTH_SHORT).show()
  
  //                    if (fab_button.visibility==View.INVISIBLE){
  //                        fab_button.visibility=View.VISIBLE
  //                    }
  
                      if (bottomNav.visibility==View.INVISIBLE){
                          bottomNav.visibility=View.VISIBLE
                      }
  
  
                  } else {
                      // Scrolling down
  //                    if (fab_button.visibility==View.VISIBLE){
  //                        fab_button.visibility=View.INVISIBLE
  //                    }
                  }
  
                  if (bottomNav.visibility==View.VISIBLE){
                      bottomNav.visibility=View.INVISIBLE
                  }
              }
  
              override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
                  super.onScrollStateChanged(recyclerView, newState)
  
                  if (newState == AbsListView.OnScrollListener.SCROLL_STATE_FLING) {
                      // Do something
                      Toast.makeText(activity,&quot;Going upp&quot;, Toast.LENGTH_SHORT).show()
  
                  } else if (newState == AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {
                      // Do something
                  } else {
                      // Do something
                  }
              }
          })
  
  
      }
  
  
  
  }
  </code></pre>
  <p>recyclerview</p>