use the appropriate scope with ViewModelProvider. In the previous example, MainActivity is used as the scope in both MainActivity and ListFragment, so they are both provided the same ViewModel. If ListFragment were to instead use itself as the scope, it would be provided a different ViewModel than MainActivity.
Линк https://developer.android.com/guide/fragments/communicate
Разные скоупы, не получится одна вм для шеринга
Обсуждают сегодня