title: How can I use Firebase UI database with Kotlin
body: <pre><code>val adapter = FirebaseRecyclerAdapter&lt;Discount, Holder&gt;(
                  Discount::class.java,
                  R.layout.fragment_main_day_item,
                  Holder::class.java,
                  FirebaseDatabase.getInstance().getReference()
          ) {
              override fun populateViewHolder(holder: Holder, dis: Discount, pos: Int){
  
              }
          }
  </code></pre>
  
  <p>docs are <a href="https://github.com/firebase/FirebaseUI-Android/tree/master/database#create-custom-firebaserecycleradapter-subclass" rel="nofollow noreferrer">here</a></p>
  
  <p>How can I handle this using Kotlin</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>val mAdapter = object : FirebaseRecyclerAdapter&lt;Chat, ChatHolder&gt;(
              Chat::class.java,
              R.layout.fragment_main_day_item,
              ChatHolder::class.java,
              ref) {
          public override fun populateViewHolder(holder: ChatHolder, chat: Chat, position: Int) {
  
          }
      }
  </code></pre>
  
  <p>I converted java to kotlin and it works.</p>