title: Android nested ViewModel with navigation controller
body: <p>I have an activity with a fragment inside (<strong>ParentFragment</strong>).</p>
  
  <p>The <strong>ParentFragment</strong> has a fragment with its navigation controller with multiple fragments.</p>
  
  <p>The <strong>ParentFragment's</strong> ViewModel has title, subtitle and color properties.</p>
  
  <p>Every time I navigate to another fragment the <strong>ParentFragment's</strong> ViewModel data should be updated (the fragments are the ones with the data), how can I achieve that?</p>
  
  <p>I know how to share a viewModel, It doesn't fit the project needs, each fragment should have its viewModel, and the same for the <strong>ParentFragment</strong>.</p>
  
  <pre><code>class ParentFragment: Fragment() {
      private lateinit var parentViewModel: ParentViewModel
  }
  
  class ChildFragment: Fragment() {
      private lateinit var childViewModel: ChildViewModel
  }
  
  class ParentViewModel : ViewModel() {
       var title: String? = null
       var subtitle: String? = null
       var color: Int? = null
  }
  
  class ChildViewModel : ViewModel() {
      init {
          // I need to access ParentViewModel and update title, subtitle and color here.
      }
  }
  </code></pre>