title: Why pass the dependencies to the viewmodel via the fragment?
body: <p>I'm working through Google's Android blueprints MVVM-databinding example (<a href="https://github.com/googlesamples/android-architecture/tree/todo-mvvm-databinding/" rel="nofollow noreferrer">https://github.com/googlesamples/android-architecture/tree/todo-mvvm-databinding/</a>)</p>
  
  <p>And I noticed that the dependencies for the viewmodel are being passed via the fragment.</p>
  
  <pre><code>public static TaskDetailFragment newInstance(String taskId) {
      Bundle arguments = new Bundle();
      arguments.putString(ARGUMENT_TASK_ID, taskId);
      TaskDetailFragment fragment = new TaskDetailFragment();
      fragment.setArguments(arguments);
      return fragment;
  }
  
  @Override
  public void onResume() {
      super.onResume();
      mViewModel.start(getArguments().getString(ARGUMENT_TASK_ID));
  }
  </code></pre>
  
  <p>Couldn't the task id in the example above be passed into the constructor of the viewmodel? And the fragment be oblivious to the task id?</p>
  
  <p>Could someone explain the purpose/benefit of doing this?</p>
  
  <p>Thank you!</p>