title: How to use Tab layout with the data binding library and Kotlin
body: <p>I'm trying to use Tab Layout + Android Data Binding Library in a Kotlin project, but I'm not succeeding.</p>
  <p>Please tell me what I'm doing wrong?</p>
  <p>This is mine Activity:</p>
  <pre><code>class WoActivity : BaseActivity()
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
  
          val binding = DataBindingUtil.setContentView(this, R.layout.activity_wo) as ActivityWoBinding
  
          binding.wo = WorkOrder()
  
          setSupportActionBar(binding.toolbar)
          supportActionBar!!.setDisplayHomeAsUpEnabled(true)
  
          binding.setHandler(this);
          binding.setManager(getSupportFragmentManager());
  
      }
  
      companion object {
          @BindingAdapter(&quot;handler&quot;) @JvmStatic
          fun bindViewPagerAdapter(view: ViewPager, activity: WoActivity) {
              val adapter = WOPagerAdapter(activity.supportFragmentManager)
              adapter.addFragment(WoTabWoFragment.newInstance(), view.context.getString(R.string.work_order))
              adapter.addFragment(WoTabScheFragment.newInstance(), view.context.getString(R.string.scheduling))
              view.adapter = adapter
          }
  
          @BindingAdapter(&quot;pager&quot;) @JvmStatic
          fun bindViewPagerTabs(view: TabLayout, pagerView: ViewPager) {
              view.setupWithViewPager(pagerView, true)
          }
      }
  }
  </code></pre>
  <p>And this is the final result: A empty tab without touch effects
  <a href="https://i.stack.imgur.com/2EaIS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2EaIS.png" alt="enter image description here" /></a></p>