BlackZerg

Untitled

Sep 26th, 2021
786
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. abstract class BaseFragment<VB: ViewBinding> : Fragment() {
  2.  
  3.     abstract val inflate: Inflate<VB>
  4.     protected abstract var binding: VB
  5.  
  6.     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? =
  7.         binding.apply {
  8.             inflate.invoke(inflater, container, false)
  9.         }.root
  10. }
RAW Paste Data