daily pastebin goal
77%
SHARE
TWEET

Untitled

a guest Oct 18th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class MVVMFragment : Fragment() {
  2.  
  3.     companion object {
  4.         fun newInstance() = MVVMFragment()
  5.     }
  6.  
  7.     private lateinit var viewModel: MVVMViewModel
  8.  
  9.     override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
  10.                               savedInstanceState: Bundle?): View? {
  11.         return inflater.inflate(R.layout.mvvm_fragment, container, false)
  12.     }
  13.  
  14.     override fun onActivityCreated(savedInstanceState: Bundle?) {
  15.         super.onActivityCreated(savedInstanceState)
  16.         viewModel = ViewModelProviders.of(this).get(MVVMViewModel::class.java)
  17.         // TODO: Use the ViewModel
  18.     }
  19.  
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top