Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Jintin committed Dec 19, 2020
1 parent e398826 commit 1c0e8d9
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import android.view.LayoutInflater
import androidx.appcompat.app.AppCompatActivity
import androidx.viewbinding.ViewBinding

open class BindingActivity<V : ViewBinding>(private val inflater: (LayoutInflater) -> V) :
AppCompatActivity() {
open class BindingActivity<V : ViewBinding>(
private val bindingProvider: (LayoutInflater) -> V
) : AppCompatActivity() {

lateinit var binding: V

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = inflater.invoke(layoutInflater)
binding = bindingProvider.invoke(layoutInflater)
setContentView(binding.root)
}
}

0 comments on commit 1c0e8d9

Please sign in to comment.