Android ViewModel for a custom view : <p>I would like to refactor my Custom View to use android architecture components. However, I see that </p>

<pre><code>ViewModelProviders.of(...)
</code></pre>

<p>takes only Activity or fragment. Any idea how to make it work? Should I use fragment instead of Custom View?</p>
