title: ViewPager2 dependency confusion
body: <p>I was about to try <a href="https://developer.android.com/reference/androidx/viewpager2/widget/ViewPager2" rel="nofollow noreferrer">ViewPager2</a> but I don't understand when I saw someone add the following dependency declaration in their gradle file:</p>
  <pre><code>implementation 'androidx.viewpager2:viewpager2:1.0.0'
  </code></pre>
  <p>I am using AndroidX and, even without adding this in my app-level gradle file, I still have access to the <a href="https://developer.android.com/reference/androidx/viewpager2/widget/ViewPager2" rel="nofollow noreferrer">ViewPager2</a> class and I am able to add it in my code. Is this line only needed when a project is still using legacy Android support libraries and you just want to use a specific AndroidX component such as ViewPager2?</p>