title: How to close/finish the first activity when navigating from first activity to second activity using android navigation component
body: <p>I have been using android navigation component for the first time and I am new to the Android architecture component as well. As far as I have seen, the navigation component in android architecture uses fragment predominantly for navigation within the same activity. I was trying to navigate from one activity to another using the navigation component: </p>
  
  <pre><code>activity.finish()              
  Navigation.findNavController(btnView).navigate(R.id.activity)
  </code></pre>
  
  <p>Here <code>R.id.activity</code> is the id of the activity defined in the navigation graph XML file. </p>
  
  <p>When I press the back button, I was still able to see the previous screen. My question is how the back stack works in the navigation component and why my first activity appears even though the destroy method of the activity is called (due to <code>activity.finish()</code>) ?</p>