title: In kotlin how to use ViewModel With ViewModelProvider.AndroidViewModelFactory?
body: <p>In my current project I use the next line:</p>
  
  <pre><code>mViewModel = ViewModelProviders.of(this).get(MainViewModel::class.java)
  </code></pre>
  
  <p>For instance a <code>ViewModel</code> but in <a href="https://developer.android.com/reference/android/arch/lifecycle/ViewModelProviders.html#ViewModelProviders()" rel="noreferrer">https://developer.android.com/reference/android/arch/lifecycle/ViewModelProviders.html#ViewModelProviders()</a> recommend use <code>ViewModelProvider.AndroidViewModelFactory</code> because <code>ViewModelProviders()</code> was deprecated in API level 1.1.0. </p>
  
  <p>any idea for this purpose?</p>